home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Belgian Amiga Club - ADF Collection
/
BS1 part 60.zip
/
BS1 part 60
/
Treble Champions II.adf
/
Trashcan
/
tc2
< prev
next >
Wrap
Text File
|
1978-12-01
|
78KB
|
3,411 lines
REM $option l-
REM $option k100
REM $option y
SCREEN 1,320,260,3,1
WINDOW 1,,(0,0)-(320,260),16+32+128+256,1
SUB pal
PALETTE 0,0,0,0
PALETTE 1,1,1,1
PALETTE 2,.4,.4,.4
PALETTE 3,1,0,0
PALETTE 4,0,1,0
PALETTE 5,.3,.3,.7
PALETTE 6,1,1,0
PALETTE 7,0,1,1
END SUB
CALL pal
DIM W(20,2),D(20,8),S(5,20,3),F(22),V$(17),A$(5,20),B$(22),C$(100),E(22)
DIM A&(5,20),B&(22),C&(100),H(15),O(4),T$(22),i(3,22),T(22),rgb%(16)
DIM l(87,6),cup%(64,3),rec(26),rec$(2),rst(5),res%(70,6)
E$=SPACE$(22)
H$=SPACE$(15)
F$=SPACE$(22)
DEF FND$(X)=MID$(STR$(X),1-(X>=0))
DEF FNTB$(X)
IF POS(0)>X THEN PRINT
PRINT SPACE$(X-POS(0));
END DEF
DEF fnr(x)=INT(RND(1)*x)
speed=5:hdg=3:txt=6:GOTO i2000
1 FOR N=1 TO 20
W(N,1)=S(F,N,2)
W(N,2)=N
NEXT N
2 FOR N=2 TO 20
3 J=N-1
L=W(N,1)
M=W(N,2)
4 IF L>W(J,1) THEN GOTO 8
5 W(J+1,1)=W(J,1)
W(J+1,2)=W(J,2)
6 J=J-1
IF J>0 THEN GOTO 4
8 W(J+1,1)=L
W(J+1,2)=M
NEXT N
RETURN
' --------------------------
11 LOCATE 3,1
PTS=0
Y=1
TM=1
FOR N=1 TO 20
D(N,8)=0
NEXT N
12 IF TM>20 THEN TM=1
13 IF D(TM,8)=0
PTS=D(TM,7)
GOTO 15
END IF
14 TM=TM+1
GOTO 12
15 FOR F=1 TO 20
IF D(F,8)<>0 THEN 18
16 IF PTS<D(F,7) AND D(F,8)=0
TM=F
PTS=D(F,7)
END IF
17 IF PTS=D(F,7) AND F<>TM AND D(F,8)=0 THEN GOSUB 22
18 NEXT F
19 IF D(TM,8)=0
D(TM,8)=Y
GOSUB 60
Y=Y+1
END IF
20 TM=TM+1
IF Y=21 THEN RETURN
21 GOTO 12
' --------------------
22 IF (D(TM,5)-D(TM,6)<(D(F,5)-D(F,6)))
TM=F
RETURN
END IF
23 IF (D(TM,5)-D(TM,6))=(D(F,5)-D(F,6)) THEN GOSUB 25
24 RETURN
25 IF D(TM,5)<D(F,5)
TM=F
RETURN
END IF
26 RETURN
' ---------------------
30 CLS:COLOR hdg
41 LOCATE 1,1
PRINT "PO NAME P W D L F A PTS"
50 GOSUB 11:COLOR txt
IF Q<>9
FOR N=1 TO 20
S(LE,N,3)=D(N,8)
NEXT N
GOSUB click
END IF
51 RETURN
' ---------------------
60 COLOR txt:LOCATE Y+1,30
IF tm=1 THEN COLOR 5
IF le=1 AND (y=1 OR y>17) THEN COLOR 1:IF tm=1 THEN COLOR 7
IF le>1 AND (y<4 OR y>17) THEN COLOR 1:IF tm=1 THEN COLOR 7
IF tm<>1 AND le=4 AND y>3 AND y<>20 THEN COLOR txt
IF tm<>1 AND le=5 AND y<>1 THEN COLOR txt
PRINT " "
LOCATE Y+1,1:PRINT FND$(D(TM,8));FNTB$(4);LEFT$(A$(LE,TM),7);D(TM,1);
PRINT FNTB$(15);FND$(D(TM,2));FNTB$(18);FND$(D(TM,3));FNTB$(21);FND$(D(TM,4));
PRINT FNTB$(24);FND$(D(TM,5));FNTB$(27);FND$(D(TM,6));FNTB$(30);FND$(D(TM,7))
RETURN
' ---------------------
70 CLS:COLOR hdg
LOCATE 1,1
PRINT "S Q U A D I N F O R M A T I O N"
PRINT "NO S T NAME A F AG P G AP"
90 FOR N=1 TO 22:COLOR txt
91 IF MID$(e$,n,1)="P" THEN COLOR 7
92 IF MID$(e$,n,1)="S" THEN COLOR 6
93 IF MID$(e$,n,1)="I" THEN COLOR 5
100 ZZ=N
GOSUB 9140
IF MID$(F$,N,1)="G" OR MID$(F$,N,1)="M"
LOCATE N+2,30:PRINT " "
END IF
120 LOCATE N+2,1:PRINT CHR$(N+64);FNTB$(4);MID$(E$,N,1);" ";MID$(f$,n,1);
PRINT FNTB$(8);MID$(B$(N),1,8);" ";FND$(Z3);" ";FND$(Z4);" ";FND$(Z5);" ";MID$(P$,N,1);" "
IF i(3,n) > 0 THEN
LOCATE N+2,27:PRINT FND$(i(3,n))
END IF
121 IF F(N) > 0 THEN
LOCATE N+2,30:PRINT FND$(F(N))
END IF
130 NEXT N
IF Q=9 THEN RETURN
140 GOSUB click:GOTO 5000
' ---------------------
200 IF MA>44 OR fnr(10)+1>5 THEN RETURN
220 CLS
FOR N=1 TO 10
PP=fnr(20)+1
ZZ=PP
GOSUB 9140
IF N<10 AND (T$(PP)="T" OR i(2,pp)=0) THEN N=10
224 NEXT N
IF B$(PP)="RESERVE " THEN 220
230 DM=LE
ZZ=PP
GOSUB 9140
Q=9
GOSUB 6230
Q=0
290 T3=CO
T1=(LE-1)+fnr(2)
T2=fnr(19)+2
IF T1<1 OR T1>5 THEN 290
301 X=fnr(70)+40
T3=INT(T3/100)
T3=(INT(T3*(X/100)))*100
IF i(1,N)>0 THEN T3=T3/5*2
310 COLOR 4:DT=0
LOCATE 4,1:PRINT A$(T1,T2);" Offer £";FND$(T3);" FOR"
PRINT:PRINT B$(PP)
Y$=MID$(F$,PP,1)
x$="G/KEEPER":IF Y$="D" THEN X$="DEFENDER"
IF Y$="M" THEN X$="MIDFIELDER"
IF Y$="F" THEN X$="FORWARD"
PRINT:PRINT X$
x$=MID$(E$,PP,1):IF x$=" " THEN x$="O.K."
PRINT:PRINT "Current status : ";x$
311 GOSUB 9140
Q=0
PRINT:PRINT "Skill =";FND$(Z3);" Form =";FND$(Z4);" Age =";FND$(Z5)
IF fnr(20)+1>18 AND i(2,pp)<>0 THEN
DT=1:T$(PP)="D":PRINT:i(2,pp)=0
LOCATE 19,1:PRINT "AFTER PLAYER DEMANDS TRANSFER"
END IF
IF dt=0 THEN GOSUB 2000
IF FG=9
FG=0
GOTO 340
END IF
320 COLOR 2:LOCATE 25,1:PRINT "DO YOU ACCEPT Y/N ?"
x$="":DO WHILE x$<>"y" AND x$<>"n"
x$=INKEY$
LOOP:LOCATE 25,1:PRINT SPACE$(28)
IF x$="n" THEN 390
330 IF fnr(Z3)+1>fnr(12)+1
COLOR 5
LOCATE 21,1:PRINT "PLAYER UNABLE TO AGREE PERSONAL"
PRINT TAB(1);"TERMS WITH ";A$(T1,T2)
GOSUB click
GOTO 380
END IF
340 IF DT=0 THEN LOCATE 21,1:COLOR 5:PRINT "PLAYER TRANSFERRED"
GOSUB wait_while:GOSUB wait_while
350 B&(PP)=(6-LE)*1000+100+fnr(8)+18
B&(PP)=B&(PP)*10+(fnr(5))
B&(PP)=B&(PP)*1000
i(1,PP)=0:i(2,pp)=1:i(3,pp)=0
T(PP)=0
F(PP)=0
STRSET B$(PP),"RESERVE"
MO=MO+T3
351 MID$(P$,PP,1)="0"
MID$(E$,PP,1)=" "
B&(PP)=B&(PP)+100
T$(PP)=" "
GOSUB 9140
LY=LE
GOSUB 9350
E(PP)=INT(T*0.0065):E(pp)=E(pp)*100
380 RETURN
390 IF B&(PP)>30000000 AND DT=1 THEN B&(PP)=B&(PP)-20000000
395 GOTO 380
' ---------------------
430 X=0
GOSUB 475
IF HR<2 OR QQ=0 THEN RETURN
431 OF=CO:X=(fnr(40)+80)/100
CO=INT((CO/100)*X)*100:OF=CO
x=INT(CO*.15)
CO=CO-x
IF INT(RND*3)+1>1 THEN co=co+x+x
432 COLOR 7:LOCATE 24,1 PRINT "OFFER £";INT(OF)
COLOR 2:LOCATE 25,1:PRINT "(H)IGHER (L)OWER OR (O)FFER"
X$="":DO WHILE X$<>"h" AND X$<>"l" AND X$<>"o"
X$=INKEY$
LOOP
IF X$="h" THEN OF=OF+10000:GOTO 432
IF X$="l" AND OF>19999 THEN OF=OF-10000:GOTO 432
IF x$="l" AND OF<20000 THEN 432
433 HR=HR-1
IF OF<CO
LOCATE 24,1:PRINT SPACE$(30):PRINT SPACE$(30)
LOCATE 25,1:PRINT "OFFER TOO LOW"
GOSUB WAIT_WHILE
GOSUB WAIT_WHILE
GOTO 473
END IF
434 Z=OF
IF Z>MO
LOCATE 24,1:PRINT SPACE$(30):PRINT SPACE$(30)
LOCATE 25,1:PRINT "YOU NEED A LOAN"
GOSUB WAIT_WHILE
GOSUB WAIT_WHILE
GOTO 473
END IF
435 LY=DM
QQ=9
GOSUB 3050
QQ=0
IF X=5 THEN GOTO 474
439 XT=99
T$(TS)=" "
MID$(P$,TS,1)="0"
MID$(E$,TS,1)=" "
i(1,TS)=0:IF of>rec(16) THEN rec(16)=of
Z6=0
i(3,ts)=0
IF Z5<25 THEN Z6=fnr(4)+1
460 LOCATE 24,1:PRINT SPACE$(30):PRINT SPACE$(30)
LOCATE 25,1:PRINT "PLAYER TRANSFERRED"
GOSUB WAIT_WHILE
GOSUB WAIT_WHILE
STRSET B$(TS),SPACE$(10)
E(TS)=Z
N=TS
Q=9:GOSUB 8815:Q=0
461 B&(TS)=(INT(B&(TS)/100))*100
T(TS)=0
MO=MO-OF
F(TS)=0
462 X=fnr(100)+1
C$(YZ)=C$(X)
STRSET C$(X),Y$
XZ=C&(YZ+ZM)
C&(YZ+ZM)=C&(X)
C&(X)=XZ
473 GOSUB WAIT_WHILE
LOCATE 24,1:PRINT SPACE$(30)
PRINT SPACE$(30):PRINT SPACE$(30)
474 RETURN
' ---------------------
475 QQ=0
FOR N=1 TO 22
IF B$(N)="RESERVE " AND MID$(H$,PP,1)=MID$(F$,N,1)
QQ=9
TS=N
N=20
END IF
479 NEXT N
RETURN
' ---------------------
480 IF LM<2 THEN RETURN
490 COLOR 2:LOCATE 24,1:PRINT "DIVISION":Q=8
GOSUB 9100
500 F=z:COLOR hdg
x$="PREMIER":IF f=2 THEN x$="DIVISION 1"
IF f=3 THEN x$="DIVISION 2"
IF f=4 THEN x$="DIVISION 3"
IF f=5 THEN x$="NON LEAGUE"
LOCATE 1,14:PRINT x$
GOSUB 1
COLOR txt:GOSUB 525
LOCATE 24,1:PRINT SPACE$(20)
IF QQ=9 THEN RETURN
510 GOSUB click
520 GOSUB CLEAR_RIGHT_WINDOW
RETURN
' ---------------------
525 FOR Q=20 TO 1 STEP -1
537 S(F,W(Q,2),3)=21-Q
COLOR txt
IF f=1 AND (21-q=1 OR 21-q>17) THEN COLOR 1
IF f>1 AND (21-q<4 OR 21-q>17) THEN COLOR 1
IF f=5 AND 21-q<>1 THEN COLOR txt
IF f=4 AND 21-q>10 AND 21-q<>20 THEN COLOR txt
LOCATE 22-Q,14:PRINT FND$(21-Q);FNTB$(17);LEFT$(A$(Z,W(Q,2)),8);" ";
PRINT FND$(S(Z,W(Q,2),1));FNTB$(30);FND$(S(Z,W(Q,2),2))
538 NEXT Q
RETURN
' ---------------------
540 LOCATE 1,13:COLOR hdg
PRINT " OPTIONS "
545 DATA "AUTO RESULTS","RESULT ONLY","SAVE GAME"
DATA "LOAD GAME","RETURN"
550 RESTORE 545
CC=5:COLOR txt
FOR N=1 TO 5
READ X$
LOCATE CC,14:PRINT FND$(N);" ";X$;
CC=CC+2
555 IF N<3 THEN PRINT FNTB$(30);FND$(O(N))
568 NEXT N
YY=5
Q=8
GOSUB 9100
IF Z=5 OR (SE=1 AND Z=3 AND D(1,1)<1) THEN clear_right_window
570 IF z=3
LOCATE 25,1:PRINT "SAVE GAME Y/N ?"
x$="":DO WHILE x$<>"y" AND x$<>"n"
x$=INKEY$
LOOP
IF x$="y" THEN GOSUB save_game
END IF
572 IF z=4
LOCATE 25,1:PRINT "LOAD GAME Y/N ?"
x$="":DO WHILE x$<>"y" AND x$<>"n"
x$=INKEY$
LOOP
IF x$="y" THEN GOSUB load_game:LOCATE 1,1:COLOR 4:PRINT "[HOURS = ";FND$(HR);"] "
END IF
573 IF z<3 THEN O(z)=O(z)+1
IF O(z)=2 THEN O(z)=0
GOTO 540
' ---------------------
save_game:
LOCATE 25,1:COLOR 2
PRINT "Writing Data to disk... "
OPEN "PLAYER.INFO" FOR OUTPUT AS #1
WRITE #1,SK,DI,SE,LE,CL,MA,RE,R1,R2,LG,LM,MO,ST,PS,HR
WRITE #1,MW,MS,FLG,REFG,B,C,K$,O,R,J$,FS,FAD,FAT,LCD,LCT
WRITE #1,IR,A2,B2,OV,MFG,ATT,X$,IC,RMC,SPEED
FOR n=1 TO 70:FOR s=1 TO 6:WRITE #1,res%(n,s):NEXT:NEXT
FOR I_ONE = 1 TO 5 ' ** A$ **
FOR I_TWO = 1 TO 20
WRITE #1,A$(I_ONE,I_TWO)
NEXT I_TWO
NEXT I_ONE
WRITE #1,C$
FOR I_ONE = 1 TO 5 ' ** A **
FOR I_TWO = 1 TO 20
WRITE #1,A&(I_ONE,I_TWO)
NEXT I_TWO
NEXT I_ONE
WRITE #1,C&
FOR I_ONE = 1 TO 20
FOR I_TWO = 1 TO 8
WRITE #1,D(I_ONE,I_TWO) ' ** D **
NEXT I_TWO
NEXT I_ONE
WRITE #1,V$,E,E$,F$
FOR I_ONE = 1 TO 20 ' ** W **
FOR I_TWO = 1 TO 2
WRITE #1,W(I_ONE,I_TWO)
NEXT I_TWO
NEXT I_ONE
WRITE #1,I,T$,O,P$,T,F,H$,H
FOR I_ONE = 1 TO 5 ' ** S **
FOR I_TWO = 1 TO 20
FOR I_THREE = 1 TO 3
WRITE #1,S(I_ONE,I_TWO,I_THREE)
NEXT I_THREE
NEXT I_TWO
NEXT I_ONE
FOR I_ONE = 1 TO 22 ' ** B$ **
WRITE #1,B$(I_ONE)
NEXT I_ONE
FOR I_ONE = 1 TO 22 ' ** B **
WRITE #1,B&(I_ONE)
NEXT I_ONE
FOR I_ONE = 1 TO 4 ' ** O **
WRITE #1,O(I_ONE)
NEXT I_ONE
FOR I_ONE = 1 TO 22
WRITE #1,E(I_ONE) ' ** E **
WRITE #1,F(I_ONE) ' ** F **
WRITE #1,T(I_ONE) ' ** T **
NEXT I_ONE
FOR n= 1 TO 3:FOR d=1 TO 22:WRITE #1,i(n,d):NEXT:NEXT
FOR I_ONE = 1 TO 22
WRITE #1,T$(I_ONE) ' ** T$ **
NEXT I_ONE
FOR n=1 TO 87:FOR s=1 TO 6:WRITE #1,l(n,s):NEXT:NEXT
FOR n=1 TO 64:FOR s=1 TO 3:WRITE #1,cup%(n,s):NEXT:NEXT
FOR n=1 TO 16:WRITE #1,rec(n):NEXT
FOR n=1 TO 5:WRITE #1,rst(n):NEXT
WRITE #1,rec$(1),rec$(2)
WRITE #1,M$ ' ** MANAGERS NAME **
WRITE #1,LO,MM
CLOSE #1
LOCATE 22,1
PRINT " "
GOSUB clear_right_window
RETURN
' ---------------------
load_game:
LOCATE 25,1:COLOR 2
PRINT "Reading Data from disk... "
OPEN "PLAYER.INFO" FOR INPUT AS #1
INPUT #1,SK,DI,SE,LE,CL,MA,RE,R1,R2,LG,LM,MO,ST,PS,HR
INPUT #1,MW,MS,FLG,REFG,B,C,K$,O,R,J$,FS,FAD,FAT,LCD,LCT
INPUT #1,IR,A2,B2,OV,MFG,ATT,X$,IC,RMC,SPEED
FOR n=1 TO 70:FOR s=1 TO 6:INPUT #1,res%(n,s):NEXT:NEXT
FOR I_ONE = 1 TO 5 ' ** A$ **
FOR I_TWO = 1 TO 20
INPUT #1,A$(I_ONE,I_TWO)
NEXT I_TWO
NEXT I_ONE
INPUT #1,C$
FOR I_ONE = 1 TO 5 ' ** A **
FOR I_TWO = 1 TO 20
INPUT #1,A&(I_ONE,I_TWO)
NEXT I_TWO
NEXT I_ONE
INPUT #1,C&
FOR I_ONE = 1 TO 20
FOR I_TWO = 1 TO 8
INPUT #1,D(I_ONE,I_TWO) ' ** D **
NEXT I_TWO
NEXT I_ONE
INPUT #1,V$,E,E$,F$
FOR I_ONE = 1 TO 20 ' ** W **
FOR I_TWO = 1 TO 2
INPUT #1,W(I_ONE,I_TWO)
NEXT I_TWO
NEXT I_ONE
INPUT #1,I,T$,O,P$,T,F,H$,H
FOR I_ONE = 1 TO 5 ' ** S **
FOR I_TWO = 1 TO 20
FOR I_THREE = 1 TO 3
INPUT #1,S(I_ONE,I_TWO,I_THREE)
NEXT I_THREE
NEXT I_TWO
NEXT I_ONE
FOR I_ONE = 1 TO 22 ' ** B$ **
INPUT #1,B$(I_ONE)
NEXT I_ONE
FOR I_ONE = 1 TO 22 ' ** B **
INPUT #1,B&(I_ONE)
NEXT I_ONE
FOR I_ONE = 1 TO 4 ' ** O **
INPUT #1,O(I_ONE)
NEXT I_ONE
FOR I_ONE = 1 TO 22
INPUT #1,E(I_ONE) ' ** E **
INPUT #1,F(I_ONE) ' ** F **
INPUT #1,T(I_ONE) ' ** T **
NEXT I_ONE
FOR n= 1 TO 3:FOR d=1 TO 22:INPUT #1,i(n,d):NEXT:NEXT
FOR I_ONE = 1 TO 22
INPUT #1,T$(I_ONE) ' ** T$ **
NEXT I_ONE
FOR n=1 TO 87:FOR s=1 TO 6:INPUT #1,l(n,s):NEXT:NEXT
FOR n=1 TO 64:FOR s=1 TO 3:INPUT #1,cup%(n,s):NEXT:NEXT
FOR n=1 TO 16:INPUT #1,rec(n):NEXT
FOR n=1 TO 5:INPUT #1,rst(n):NEXT
INPUT #1,rec$(1),rec$(2)
INPUT #1,M$ ' ** MANAGERS NAME **
INPUT #1,LO,MM
CLOSE #1
LOCATE 22,1
PRINT " "
GOSUB clear_right_window
RETURN
' ---------------------
i620:
GOSUB 8200
CLS:COLOR 1,0,1
LOCATE 3,3
PRINT "TREBLE CHAMPIONS II OPTIONS"
i630: LOCATE 24,3:COLOR 2
PRINT "Select SKILL LEVEL 1 to 3"
x=0:DO WHILE x<1 OR x>3
x$=INKEY$:x=VAL(x$)
LOOP
di=x
LOCATE 7,3:COLOR 3:PRINT "Skill Level:";x
i640: LOCATE 24,3:COLOR 2
PRINT "Select DIFFICULTY 1 to 5 "
x=0:DO WHILE x<1 OR x>5
x$=INKEY$:x=VAL(x$)
LOOP
sk=x
LOCATE 9,3:COLOR 3:PRINT "Difficulty :";x
i650: COLOR 2:m$="":DO WHILE LEN(m$)<1 OR LEN(m$)>15
LOCATE 22,3:PRINT "MANAGER'S NAME (15 Chrs)"
LOCATE 24,1:PRINT SPACE$(38)
LOCATE 24,3:INPUT m$
LOOP
LOCATE 22,1:PRINT SPACE$(38)
LOCATE 24,1:PRINT SPACE$(38):m$=UCASE$(m$)
LOCATE 11,3:COLOR 3:PRINT "Manager : "m$
i660:
LE=SK
LY=LE:GOSUB c100
FOR N=1 TO 22
Z=(SK-1)+(DI-1)
X$=FND$(B&(N))
ZZ=VAL(LEFT$(X$,1))
ZZ=ZZ-Z
IF ZZ>3 THEN ZZ=ZZ-1
i670: Z$=FND$(ZZ)
MID$(X$,1,1)=Z$
B&(N)=VAL (X$)
i675: ZZ=N
GOSUB 9140
i(2,n)=INT(RND*5)+1:ZM=i(2,n)
GOSUB 9350
E(N)=T
i680: NEXT N
i690: MO=((6-SK)*10000)*(4-DI)
ST=0
MS=((6-SK)*5000)+((3-DI)*1000)
i703: B=0
C=0
IF LE=3 OR LE=4 THEN
b=fnr(2)+3
c=fnr(19)+2
END IF
i705: IF LE<5 AND LG=2 OR MA=1
K$="HOME TO "
IF fnr(2)+1=2 THEN K$="AWAY TO "
END IF
i706:
i707: IF CP=3 AND R1>6 THEN J$="NEUTRAL "
i708: IF CP=2 AND R2>6 THEN K$="NEUTRAL "
i710: IF Q<>0 THEN RETURN
i715: HR=14-(DI*2)
HR=HR*3
IF LE=5 THEN ST=2
i716: x=6-LE:rst(1)=x*2000:rst(2)=x*1500
rst(3)=x:rst(4)=x*2:rst(5)=x
i718: FOR N=1 TO 5
FOR F=1 TO 20
S(N,F,3)=fnr(20)+1
NEXT F
NEXT N
GOTO 5000
' ---------------------
620 X=0
FOR N=1 TO 22
IF MID$(E$,N,1)="I" OR MID$(E$,N,1)="1" OR MID$(E$,N,1)="2" THEN X=X+1
630 IF X>6 AND MID$(E$,N,1) <> "P"
MID$ (E$,N,1) = " "
i(1,N)=0
END IF
640 NEXT N
RETURN
' ---------------------
650 TE=1
FOR N=1 TO 20
IF A$(LE,N)=W$ THEN TE=N
660 NEXT N
IF TE=1 THEN 675
670 Y$=A$(LE,1)
STRSET A$(LE,1),W$
STRSET A$(LE,TE),Y$
675 RETURN
' ---------------------
680 MHT=1
MHL=LE
MAT=OP
MAL=LY
690 IF (CP=3 AND J$="AWAY TO ") OR (CP=2 AND K$="AWAY TO ")
MHT=OP
MHL=LY
MAT=1
MAL=LE
END IF
700 RETURN
' ---------------------
703 B=0
C=0
IF LE=3 OR LE=4
B=INT (RND(1) *2)+3
C=INT (RND(1) *19)+2
END IF
705 IF LG=2 OR MA=1
K$="HOME TO "
IF fnr(2)+1=2 THEN K$="AWAY TO "
END IF
706
707 IF CP=3 AND R1>6 THEN J$="NEUTRAL "
708 IF CP=2 AND R2>6 THEN K$="NEUTRAL "
710 RETURN
' ---------------------
725 GOSUB 8020
727 IF CP=3
Q=9
GOSUB 706
END IF
728 IF CP=2
Q=7
GOSUB 705
END IF
760 RETURN
' ---------------------
800 T=0
CC=0
S=0
FOR N=1 TO 22
IF MID$(E$,N,1)="P" THEN T=T+1
801 IF MID$(E$,N,1)="S" THEN MID$(E$,N,1)=" "
802 IF MID$(E$,N,1)="I" OR MID$(E$,N,1)="1" OR MID$(E$,N,1)="2" THEN CC=CC+1
805 NEXT N
GOSUB 620
Q=9
GOSUB 70
Q=0
GOSUB 880
IF T>10 THEN 826
820 ' PRINT T
sub$=" PICK PLAYER"
Q=7
GOSUB 9500:z=z-32:sub$=""
IF MID$(E$,Z,1)="I" OR MID$(E$,Z,1)="1" OR MID$(E$,Z,1)="2" OR MID$(E$,Z,1)="P" OR i(1,Z)>0 THEN 820
825 MID$(E$,Z,1)="P"
q=9:GOSUB 90:q=0
T=T+1
GOSUB 880
826 sc=0:IF T=11
LOCATE 25,1:COLOR 2:PRINT "FINAL TEAM Y/N ? "
x$=" ":DO WHILE x$<>"y" AND x$<>"n"
x$=INKEY$
LOOP
IF x$<>"y" THEN GOSUB 890:sc=1
END IF
IF sc=1 THEN 820
827 IF T<11 THEN 820
830 IF S>1 THEN 850
835
sub$=" PICK SUB"
Q=7
GOSUB 9500:z=z-32:sub$=""
IF MID$(E$,Z,1)="I" OR MID$(E$,Z,1)="1" OR MID$(E$,Z,1)="2" OR MID$(E$,Z,1)="P" OR MID$(E$,Z,1)="S" OR i(1,Z)>0
GOTO 835
END IF
840 MID$(E$,Z,1)="S"
q=9:GOSUB 90:q=0
S=S+1
GOSUB 880
IF S<2 THEN 835
850 GOSUB 900
RETURN
' ---------------------
880 COLOR 2:LOCATE 1,1:PRINT SPACE$(32)
LOCATE 1,1:PRINT "PLAYERS PICKED -";FND$(T);" ";FNTB$(25);"SUBS -";FND$(S)
RETURN
' ---------------------
890 sub$=" DROP PLAYER"
Q=7
GOSUB 9500:z=z-32:sub$=""
IF MID$(E$,Z,1)<>"P" THEN 890
895 MID$(E$,Z,1)=" "
q=9:GOSUB 90:q=0
T=T-1
GOSUB 880
RETURN
' ---------------------
900 REDIM W(20,2)
SW1=0
SW2=0
SX=0
M1=0
CLS:COLOR hdg
IF CP=1
W$="HOME TO "
IF MHT<>1 THEN W$="AWAY TO "
END IF
901 IF CP>1 THEN GOSUB 680
902
LOCATE 1,1
game$=" "+A$(LE,1)+" "+W$+" "+A$(LY,OP)+" "
PRINT game$
904 Z1=LY
Z2=OP
GOSUB 9120
XM=Z1+(Z2-1)+Z3-Z4+Z6
ZM=Z4:XY=Z3
905 FOR G=1 TO 2
QW=20
908 IF G=1
Q=9
GOSUB 2700
Q=0
END IF
910 IF G=2
Y=0
FOR N=XM TO (XM+(ZM*14)) STEP ZM
Y=Y+1
H(Y)=N
913 NEXT N
END IF
IF G=2
GOSUB 981
M1=16
GOTO 979
END IF
918 ' NEXT N
930 FOR N=1 TO 22
IF MID$(E$,N,1)<>"P" THEN 950
932 ZZ=N
GOSUB 9140
Y$=MID$(F$,N,1)
940 IF Y$="G" THEN W(1,G)=Z3
942 IF Y$="D" THEN W(2,G)=W(2,G)+Z3
943 IF Y$="M" THEN W(3,G)=W(3,G)+Z3
944 IF Y$="F" THEN W(4,G)=W(4,G)+Z3
946 W(5,G)=W(5,G)+Z4
947 IF Q=9 THEN RETURN
950 NEXT N
IF Q=7 THEN RETURN
979 NEXT G
980
GOSUB click
RETURN
' ---------------------
981 FOR N=1 TO 5
W(N,2)=0
NEXT N
G=2
ZY=ZM-1
IF SX=0
SELECT CASE ZY
CASE 1
RESTORE 990 ' POINT TO CORRECT DATA SCRUCTURE
CASE 2
RESTORE 992
CASE 3
RESTORE 994
CASE ELSE
PRINT "BAD VALUE OF ZY AT LINE 981"
STOP
END SELECT
RES=(990+(ZY*2))-2
END IF
982 GOSUB 996
Y=2
FOR N=1 TO 15
IF Y > 12 THEN COLOR 4
984 IF Y > 12 AND (N =SB1 OR N =SB2) THEN 987
985 IF Y < 13 AND N=N1 OR N=N2 OR N=SB1 OR N=SB2 OR N=SW1 OR N=SW2 THEN 988
986 IF Y > 12 THEN 988
987 ZZ=H(N)+ZM
GOSUB 9130
Z3=Z3+INT(XY/1.55)
LOCATE Y,17:IF y<13 THEN COLOR 7
PRINT MID$(H$,N,1);" ";C$(H(N));" ";fnd$(Z3)
Y=Y+1
IF Y<14
Y$=MID$(H$,N,1)
Q=9
GOSUB 940
Q=0
END IF
988 IF Y=13 AND Q=0
N=1
Q=9
END IF
989 NEXT N
Q=0
RETURN
' ---------------------
990 DATA 9,3,15,7,8,14
992 DATA 7,12,13,10,3,14
994 DATA 6,10,14,4,2,8
996 IF FG<>88
IF RES=0
PRINT "BAD VALUE OF RES AT LINE 996"
STOP
END IF
' RESTORE RES
READ K
N1=K
READ K
N2=K
READ K
ST1=K
READ K
ST2=K
IF SX=0
READ K
SB1=K
READ K
SB2=K
END IF
END IF
997 RETURN
' ---------------------
1000 COLOR 7:IP=0
PL=0
MA=1
R1=2
R2=1
FOR i_one = 1 TO 22
f(i_one)=0
NEXT i_one
RE=0
LG=1
SE=SE+1
OT=0
MM=0
ST=0
IF LE=5 THEN ST=2
1005 rec(1)=0:rec(3)=0:rec(5)=0:rec(7)=0:rec(9)=0
1010 NT=0
ATT=0
FS=1
MW=0
CLS
1020 FOR N=1 TO 5
FOR F=1 TO 20
Z1=N
Z2=F
GOSUB 9120
Z5=0
Z=(Z3*10000)+(Z4*1000)+(Z5*100)+fnr(10)+1
A&(N,F)=Z
S(N,F,3)=fnr(20)+1
NEXT F
NEXT N
GOSUB 8200
1032 HR=14-(DI*2)
HR=HR*3
1040 FOR N=1 TO 22
ZZ=N:i(3,n)=0
GOSUB 9140
Z5=Z5+1
Z4=fnr(5)+1
i(2,n)=i(2,n)-1
IF Z5>34
Z5=fnr(7)+18
STRSET B$(ZZ),"RESERVE"
Z3= 6-LE
Z6=fnr(5)
LY=LE
GOSUB 9350
E(N)=T
END IF
1041 IF i(2,n)<0 THEN i(2,n)=0
IF i(2,n)>5 THEN i(2,n)=5
1042 IF Z5>30 AND Z3>1 AND fnr(10)+1>4 THEN Z3=Z3-1
1044 Z=(Z3*10000000)+(Z4*1000000)+(Z5*10000)+(Z6*1000)
B&(N)=Z
IF Q=9 THEN RETURN
1045 IF MID$(E$,N,1)="I" THEN MID$(E$,N,1)=" "
1046 IF T$(N)<>"TD" THEN T$(N)=" "
i(1,N)=0
1050 NEXT N
XX=(((6-OLD)*(21-OLDP))*((6-OLD)*50))*30
CLS
LOCATE 8,5:PRINT "SEASON TICKET SALES :"
LOCATE 11,5:PRINT "£";fnd$(XX)
MO=MO+XX:O=0:R=0
GOTO 1200
' ---------------------
1090 OLD=LE
FOR V=1 TO 5
CLS
IF V<>LE
LOCATE 1,1
6
PRINT "FINAL TABLES"
Z=V
F=V
QQ=9
GOSUB 500
QQ=0
END IF
1092 IF V=LE
Q=9
GOSUB 30
Q=0
FOR N=1 TO 20
S(LE,N,3)=D(N,8)
1093 NEXT N ' ** THIS DOESN'T LOOK RIGHT! **
END IF
1095 IF O(1)=0
GOSUB click
END IF
1100 NEXT V
FG=0
CLS:COLOR 5
I=0
FOR L=1 TO 4
1103 LOCATE 1,1:PRINT "PROMOTED TO RELEGATED TO"
1104 LOCATE I+2,1:COLOR 1
PRINT " DIV ";fnd$(L);" DIV ";fnd$(L+1)
I=I+3
1105 D=19
U=2
FOR G=1 TO 2
1108 IF L=4 AND G=1 THEN 1160
1110 DT=0
FOR N=1 TO 20
1120 IF S(L,N,3)=D
DT=N
LOCATE I,16
PRINT A$(L,DT),
N=20
END IF
1121 IF FG=0 AND L=LE AND DT=1
LE=LE+1
W$=A$(L,DT)
FG=99
END IF
1122 NEXT N
1130 UT=0
FOR N=1 TO 20
1132 IF S(L+1,N,3)=U
UT=N
LOCATE I,1
PRINT A$(L+1,UT)
N=20
END IF
1134 IF FG=0 AND L+1=LE AND UT=1
LE=LE-1
W$=A$(L+1,UT)
FG=99
END IF
1140 NEXT N
1150 Y$=A$(L,DT)
A$(L,DT)=A$(L+1,UT)
A$(L+1,UT)=Y$
1152 Y=A&(L,DT)
A&(L,DT)=A&(L+1,UT)
A&(L+1,UT)=Y
1160 D=D+1
U=U-1
I=I+1
NEXT G
1190 PRINT
NEXT L
IF O(1)=0
GOSUB click
END IF
1195 OLDP=S(OLD,1,3)
GOSUB 2900
GOSUB 650
REDIM S(5,20,3),res%(70,5)
GOTO 1000
1200 LM=1
REDIM D(20,8)
1250 Q=9
GOSUB 703
Q=0
1260 REDIM l(87,6),cup%(64,3):GOSUB c100
1265 x=1:FOR n=25 TO 44:cup%(n,1)=1:cup%(n,2)=x:x=x+1:NEXT
x=1:FOR n=45 TO 64:cup%(n,1)=2:cup%(n,2)=x:x=x+1:NEXT
1299
GOSUB click
GOTO 5000
' ---------------------
1300 IF MM<17
HT=VAL(MID$(V$(MM+1),X,2))
X=X+2
OT=VAL(MID$(V$(MM+1),X,2))
END IF
1310 IF MM>16
OT=VAL(MID$(V$(MM+1-17),X,2))
X=X+2
HT=VAL(MID$(V$(MM+1-17),X,2))
END IF
1350 RETURN
' ---------------------
i2000: RANDOMIZE TIMER
i2140: CLS:LOCATE 5,1
COLOR 6:PRINT " TREBLE CHAMPIONS II"
COLOR 5:PRINT " TREBLE CHAMPIONS II"
OPEN "TEAMDATA.DAT" FOR INPUT AS #1
FOR F=1 TO 17
INPUT #1,V$(F)
NEXT F
FOR F=1 TO 5
FOR N=1 TO 20
INPUT #1,A$(F,N)
NEXT N
NEXT F
FOR F=1 TO 122
IF F<101 THEN INPUT #1,C$(F)
IF F>100 THEN INPUT #1,B$(F-100)
NEXT F
CLOSE #1
i2360: FOR N=1 TO 5
FOR F=1 TO 20
i2370: A&(N,F)=INT((RND(1)* 3))+(7-N)
IF N<3 THEN A&(N,F)=A&(N,F)+1
i2420: IF N=1 AND (F=1 OR F=5 OR F=6 OR F=8 OR F=15) AND A&(N,F)<8
A&(N,F)=8
END IF
i2430: A&(N,F)=A&(N,F)*10
A&(N,F)=A&(N,F)+fnr(3)+2
A&(N,F)=A&(N,F)*1000
A&(N,F)=A&(N,F)+fnr(10)+1
i2440: NEXT F
NEXT N
i2450: FOR N=1 TO 100
C&(N)=fnr(3)+2
C&(N)=C&(N)*10
i2460: C&(N)=C&(N)+fnr(3)+3
C&(N)=C&(N)*100
i2470: X=fnr(15)+18
C&(N)=C&(N)+X
IF X<22 AND C&(N)>2000 THEN C&(N)=C&(N)-1000
i2480: NEXT N
i2490: MW=0:RMC=0
FG=0
LM=1
R1=2
R2=1
Q=0
SE=1
MA=1
MM=0
RE=0
LG=0
CO=0
NT=0
i2530: FOR N=1 TO 22
B&(N)=fnr(3)+7
B&(N)=B&(N)*10
i2540: B&(N)=B&(N)+fnr(5)+1
B&(N)=B&(N)*100
i2550: Z=fnr(18)+17
B&(N)=B&(N)+Z
B&(N)=B&(N)*10
i2560: IF Z<25 THEN B&(N)=B&(N)+fnr(4)
i2562: B&(N)=B&(N)*10
B&(N)=B&(N)+fnr(5)+1
B&(N)=B&(N)*100
i2570: NEXT N
i2590: P$=SPACE$(22)
FOR N=1 TO 22
MID$(F$,N,1)="G"
IF N>2 THEN MID$(F$,N,1)="D"
i2592: IF N>9 THEN MID$(F$,N,1)="M"
i2594: IF N>16 THEN MID$(F$,N,1)="F"
i2596: MID$(P$,N,1)="0"
NEXT N
i2600: FOR N=1 TO 15
MID$(H$,N,1)="G"
IF N>1
MID$(H$,N,1)="D"
MID$(E$,N,1)="P"
END IF
i2602: IF N>7 THEN MID$(H$,N,1)="M"
i2604: IF N>12 THEN MID$(H$,N,1)="F"
i2605: IF N>6 AND N<12 THEN MID$(E$,N,1)=" "
i2606: NEXT N
MID$(E$,18,1)="P"
MID$(E$,19,1)="P"
i2650: x=1:FOR n=25 TO 44:cup%(n,1)=1:cup%(n,2)=x:x=x+1:NEXT
i2652: x=1:FOR n=45 TO 64:cup%(n,1)=2:cup%(n,2)=x:x=x+1:NEXT
i2697: IP=0
A2=0
B2=0
OF=0
i2699: PL=0
W$=" "
ATT=0
XT=0
REFG=0
MFG=0
FG1=0
FLG=0
FS=1
QQ=0
IR=.5
LO=0
i2700: GOTO i620
' ---------------------
c100: cupch=0:FOR n=1 TO 24
c110: x=INT(RND*3)+3:y=INT(RND*20)+1
c112: xx=INT(RND*3)+3:yy=INT(RND*20)+1
c114: IF xx=x AND yy=y THEN c110
c120: z=0:FOR rx=1 TO 24
c122: IF (l(rx,1)=x AND l(rx,2)=y) OR (l(rx,4)=xx AND l(rx,5)=yy) OR (l(rx,1)=xx AND l(rx,2)=yy) OR (l(rx,4)=x AND l(rx,5)=y) THEN z=1
c124: NEXT
c126: IF z=1 THEN c110
c160: l(n,1)=x:l(n,2)=y
c162: l(n,4)=xx:l(n,5)=yy
c170: IF le>2 THEN
c172: IF l(n,1)=le AND l(n,2)=1 THEN j$="HOME TO ":O=l(n,4):R=l(n,5):cupch=1
c174: IF l(n,4)=le AND l(n,5)=1 THEN j$="AWAY TO ":O=l(n,1):R=l(n,2):cupch=1
c190: END IF
c200: NEXT
c250: IF cupch=0 AND le>2 THEN
c255: x=INT (RND*2)+1:y=INT(RND*24)+1
c260: IF x=1 THEN l(y,1)=le:l(y,2)=1:j$="HOME TO ":O=l(y,4):R=l(y,5)
c265: IF x=2 THEN l(y,4)=le:l(y,5)=1:j$="AWAY TO ":O=l(y,1):R=l(y,2)
c270: END IF
c500: RETURN
c1000: CLS:COLOR hdg:LOCATE 3,3:
PRINT "F. A. Cup"
c1010: COLOR txt:LOCATE 5,3:PRINT "(A) 2nd Round"
c1012: LOCATE 7,3:PRINT "(B) 3rd Round"
c1014: LOCATE 9,3:PRINT "(C) 4th Round"
c1016: LOCATE 11,3:PRINT "(D) 5th Round"
c1018: LOCATE 13,3:PRINT "(E) Quarter/Semi & Final"
c1020: LOCATE 15,3:PRINT "(F) Return"
c1040: x$=" ":DO WHILE x$<>"f" AND x$<>"a" AND x$<>"b" AND x$<>"c" AND x$<>"d" AND x$<>"e"
x$=INKEY$
LOOP
c1042: IF x$="a" THEN GOSUB c1100
c1044: IF x$="b" THEN GOSUB c1100
c1046: IF x$="c" THEN GOSUB c1100
c1047: IF x$="d" THEN GOSUB c1100
c1048: IF x$="e" THEN GOSUB c1100
c1049: IF x$="f" THEN GOSUB 5000
c1050: GOTO c1000
c1100: CLS:COLOR 5:cc=(ASC(x$))-95
IF x$="a" THEN tt=1:ed=12:z$="2nd Round - page 1"
IF x$="b" THEN tt=25:ed=40:z$="3rd Round - page 1"
IF x$="c" THEN tt=57:ed=72:z$="4th Round"
IF x$="d" THEN tt=73:ed=80:z$="5th Round"
IF x$="e" THEN tt=81:ed=87:z$="Quarter Final"
COLOR hdg:PRINT "F.A. Cup ";z$:PRINT
x=0
test=0:FOR n=tt TO ed
IF n=87 AND l(87,3)+l(87,6)=0 THEN test=1
IF n=85 AND l(85,3)+l(86,3)+l(85,6)+l(86,6)=0 THEN test=1
IF x$="e" AND n=85 THEN PRINT:PRINT:COLOR hdg:PRINT "F.A. Cup Semi-Final":COLOR txt:PRINT
IF x$="e" AND n=87 THEN PRINT:PRINT:COLOR hdg:PRINT "F.A. Cup Final":COLOR txt:PRINT
COLOR 4:x=x+1:IF x=2 THEN COLOR 7:x=0
IF n=87 THEN COLOR 1
IF (l(n,1)=le AND l(n,2)=1) OR (l(n,4)=le AND l(n,5)=1) THEN COLOR 1
PRINT a$(l(n,1),l(n,2));
IF r1>cc AND test=0 THEN PRINT TAB(13);l(n,3);
PRINT TAB(16);a$(l(n,4),l(n,5));
IF r1>cc AND test=0 THEN
PRINT TAB(28);l(n,6)
ELSE
PRINT
END IF
REM IF x$="e" AND n=84 AND r1=6 THEN n=87
REM IF x$="e" AND n=86 AND r1=7 THEN n=87
NEXT
c1110: GOSUB click:IF x$<>"a" AND x$<>"b" THEN RETURN
c1120: CLS:COLOR 5
IF x$="a" THEN tt=13:ed=24:z$="2nd Round - page 2"
IF x$="b" THEN tt=41:ed=56:z$="3rd Round - page 2"
COLOR hdg:PRINT "F.A. Cup "z$:PRINT
x=0
FOR n=tt TO ed:COLOR 4
x=x+1:IF x=2 THEN COLOR 7:x=0
IF (l(n,1)=le AND l(n,2)=1) OR (l(n,4)=le AND l(n,5)=1) THEN COLOR 1
PRINT a$(l(n,1),l(n,2));
IF r1>cc THEN PRINT l(n,3);
PRINT TAB(16);a$(l(n,4),l(n,5));
IF r1>cc THEN
PRINT TAB(28);l(n,6)
ELSE
PRINT
END IF
NEXT
c1130: GOSUB click:RETURN
c2000: rr1=r1-1:IF rr1=2 THEN x=1:xx=24:h=25:x$="F.A.Cup Results - 2nd Round"
c2001: IF rr1=3 THEN x=25:xx=56:h=57:x$="F.A.Cup Results - 3rd Round"
c2002: IF rr1=4 THEN x=57:xx=72:h=73:x$="F.A.Cup Results - 4th Round"
c2003: IF rr1=5 THEN x=73:xx=80:h=81:x$="F.A.Cup Results - 5th Round"
c2004: IF rr1=6 THEN x=81:xx=84:h=85:x$="F.A.Cup Results - Q/Final"
c2005: IF rr1=7 THEN x=85:xx=86:h=87:x$="F.A.Cup Results - S/Final"
c2006: IF rr1=8 THEN x=87:xx=87:x$="F.A.Cup Results - FINAL"
c2020: l=0:CLS:COLOR 7:PRINT x$:COLOR 3
c2021: FOR n=x TO xx:p=1:pp=2:l=l+1:IF l=2 THEN p=4:pp=5
c2022: hg1=6-l(n,1):ag1=6-l(n,4)
hg1=INT(hg1*1.5):ag1=INT(ag1*1.5)
hg=hg1-ag1:ag=ag1-hg1
IF hg<2 THEN hg=2
IF ag<1 THEN ag=1
c2024: hg=hg+3:ag=ag+3
c2025: l(n,3)=INT(RND*hg):l(n,6)=INT(RND*ag)
IF hg>6 AND INT(RND*10)+1>5 THEN hg=ag+1
IF ag>6 AND INT(RND*10)+1>5 THEN ag=hg+1
IF (l(n,1)=le AND l(n,2)=1) THEN l(n,3)=aa:l(n,6)=bb
IF (l(n,4)=le AND l(n,5)=1) THEN l(n,3)=bb:l(n,6)=aa
c2026: IF l(n,3)=l(n,6) THEN GOTO c2025:
c2027: PRINT a$(l(n,1),l(n,2));TAB(13);l(n,3);
PRINT TAB(16);a$(l(n,4),l(n,5));TAB(28);l(n,6)
GOSUB wait_while
c2028: IF n<87 AND l(n,3)>l(n,6) THEN l(h,p)=l(n,1):l(h,pp)=l(n,2)
c2029: IF n<87 AND l(n,3)<l(n,6) THEN l(h,p)=l(n,4):l(h,pp)=l(n,5)
IF n<87 THEN x=0:IF l(h,1)=le AND l(h,2)=1 THEN O=l(h,4):R=l(h,5):j$="HOME TO "
IF n<87 THEN x=0:IF l(h,4)=le AND l(h,5)=1 THEN O=l(h,1):R=l(h,2):j$="AWAY TO "
c2040: IF l=2 THEN l=0:h=h+1
c2050: NEXT
c2054: IF rr1=2 THEN
c2055: cup=1:FOR n=1 TO 24
c2056: IF l(n,3)>l(N,6) THEN cup%(cup,1)=l(n,1):cup%(cup,2)=l(n,2)
c2058: IF l(n,3)<l(N,6) THEN cup%(cup,1)=l(n,4):cup%(cup,2)=l(n,5)
c2060: cup=cup+1:NEXT
c2062: END IF
c2064: IF rr1=2 THEN GOSUB c2200
c2068: IF ma=>45 THEN j$="NEUTRAL "
c2070: PRINT:PRINT:PRINT:PRINT:GOSUB click:RETURN
c2200: FOR n=25 TO 56
c2210: x=INT(RND*64)+1:IF cup%(x,3)=1 THEN c2210
c2212: y=INT(RND*64)+1:IF cup%(y,3)=1 THEN c2212
c2214: IF x=y THEN c2210
c2240: cup%(x,3)=1:cup%(y,3)=1
c2260: l(n,1)=cup%(x,1):l(n,2)=cup%(x,2)
c2262: l(n,4)=cup%(y,1):l(n,5)=cup%(y,2)
IF l(n,1)=le AND l(n,2)=1 THEN O=l(n,4):R=l(n,5):j$="HOME TO "
IF l(n,4)=le AND l(n,5)=1 THEN O=l(n,1):R=l(n,2):J$="AWAY TO "
c2300: NEXT:RETURN
2000 IF i(2,pp)=0
COLOR 5
LOCATE 17,1:PRINT "PLAYER HAS NO CONTRACT AND HAS "
LOCATE 18,1:PRINT "ACCEPTED TERMS OFFERED BY "
LOCATE 19,1:PRINT A$(T1,T2)
FG=9:DT=2
GOSUB click
END IF
2140 RETURN
' ---------------------
2143 IF GA=2
LOCATE 13,6:COLOR 1
GOSUB WAIT_WHILE
PRINT " G O A L ! "
GOSUB delay
IF fnr(12)+1>1
GOSUB 3900
GOTO 2145
END IF
END IF
2144
LOCATE 13,5:COLOR 2
PRINT" D I S A L L O W E D "
GOSUB delay
W(8,P)=W(8,P)-1
2145 AA=W(8,1)
BB=W(8,2)
RETURN
' -------------------------
2200 CLS:PRINT "Friendly"
2299 GOSUB click:RETURN
' -------------------------
2300 COLOR 4:xx=0
2310 FOR n=1 TO 70:COLOR 4
2315 IF xx=0 AND res%(n,1)<>0 THEN
CLS:LOCATE 1,1:PRINT "Opponents F A Comp"
END IF
2320 IF res%(n,1)<>0 THEN
COLOR 6:x$="H"::IF res%(n,5)>9 THEN COLOR 7:x$="A"
xx=xx+1
PRINT a$(res%(n,1),res%(n,2));TAB(13);res%(n,3);
PRINT TAB(17);res%(n,4);TAB(21);
IF res%(n,5)=1 OR res%(n,5)=11 THEN PRINT x$;" League"
IF res%(n,5)=2 OR res%(n,5)=12 THEN PRINT x$;" League Cup"
IF res%(n,5)=3 OR res%(n,5)=13 THEN PRINT x$;" F.A.Cup"
IF res%(n,5)=6 OR res%(n,5)=16 THEN PRINT x$;" Friendly"
PRINT STR$(res%(n,6))
IF xx=10 THEN GOSUB click:xx=0
END IF
2360 NEXT:IF xx<>10 THEN GOSUB click
2399 RETURN
' -------------------------
2420 GOSUB CLEAR_RIGHT_WINDOW
2421 IF hr=0 THEN RETURN
2422 COLOR 3:LOCATE 4,15
PRINT "(C)OACH"
LOCATE 6,15
PRINT "(F)ITNESS"
LOCATE 8,15
PRINT "(R)ETURN"
Y$="":DO WHILE y$<>"c" AND y$<>"f" AND y$<>"r"
y$=INKEY$
LOOP
Y$=UCASE$(Y$)
2430 IF Y$="R" THEN 2600
2439 GOSUB clear_right_window:IF Y$="C" THEN 2450
2440 LOCATE 8,15
PRINT "SQUAD"
LOCATE 10,15
PRINT "FITNESS"
GOTO 2470
2450 LOCATE 8,15
PRINT "COACHING"
LOCATE 25,1:COLOR 2
PRINT "(G)/KEEPER (D)EF (M) OR (F)"
z$="":DO WHILE z$<>"g" AND z$<>"d" AND z$<>"m" AND z$<>"f"
z$=INKEY$
LOOP
Z$=UCASE$(Z$)
2455 x$="Goalkeepers":IF z$="D" THEN x$="Defenders"
2456 IF z$="M" THEN x$="Midfielders"
2457 IF z$="F" THEN x$="Forwards"
2460 LOCATE 10,15 :COLOR 3: PRINT UCASE$(x$)
W$=Z$
LOCATE 25,1
PRINT SPACE$(30)
2470 LOCATE 24,1:COLOR 2:PRINT "HOURS"
Q=8:YY=5:GOSUB 9100
LOCATE 24,1:PRINT SPACE$(20)
IF Z>HR THEN 2470
2480 HR=HR-Z:LOCATE 1,1:COLOR 4
PRINT "[HOURS = ";FND$(HR);"] "
ZR=Z
2490 X=fnr(10)+1
IF Y$="C" THEN 2570
2530 IF X>9
COLOR 6:LOCATE 12,15:PRINT "INJURY TO"
GOSUB wait_while
YQ=fnr(20)+3
IF MID$(E$,YQ,1)="I" THEN
GOTO 2530
END IF
LOCATE 14,15:PRINT b$(YQ)
GOSUB wait_while
GOSUB wait_while
i(1,YQ)=fnr(6)+1
END IF
2540 FOR N=1 TO 22
ZZ=N
GOSUB 9140
IF fnr(8)+ZR>7 AND MID$(E$,N,1)<>"I"
Z4=Z4+1
IF Z4<6
Q=9:GOSUB 8815:Q=0
END IF
END IF
2550 IF i(1,N)>0 THEN MID$(E$,N,1)="I"
2560 NEXT N
2562 GOTO 2420
2570 FOR N=1 TO 22
ZZ=N
GOSUB 9140
2590 X=0
IF Z5>26 OR Z6=0 OR Z3=9 THEN 2596
2592 IF fnr(ZR)+1>fnr(4) AND W$=MID$(F$,N,1) AND MID$(E$,N,1)<>"I"
X=VAL(MID$(P$,N,1))
X=X+1
MID$(P$,N,1)=FND$(X)
IF X>=(Z3+1)
Z6=Z6-1
Z3=Z3+1
X=99
END IF
END IF
2594 IF X=99 AND Z3<10
X=0
B&(N)=B&(N)+10000000
B&(N)=B&(N)-1000
MID$(P$,N,1)=FND$(X)
IF B$(N)="RESERVE " THEN STRSET B$(N),""
END IF
2596 NEXT N:GOTO 2420
2600 Q=0
GOSUB CLEAR_RIGHT_WINDOW
RETURN
' ---------------------
2700 Y=2
FOR N=1 TO 22
IF MID$(E$,N,1)="P"
ZZ=N
GOSUB 9140
LOCATE Y,1:COLOR 7
PRINT CHR$(n+64);FNTB$(4);MID$(F$,N,1);" ";MID$(B$(N),1,8);" ";fnd$(Z3)
Y=Y+1
END IF
2705 NEXT N
LOCATE 13,1
PRINT " "
LOCATE 14,1
PRINT " "
2710 FOR N=1 TO 22
IF MID$(E$,N,1)="S"
ZZ=N
GOSUB 9140
LOCATE Y,1:COLOR 4
PRINT CHR$(n+64);FNTB$(4);MID$(F$,N,1);" ";MID$(B$(N),1,8);" ";fnd$(Z3)
Y=Y+1
END IF
2715 NEXT N
QE=0
IF Q=9 THEN RETURN
2720 Q=9
YY=20
GOSUB 9500:z=z-32
2725 IF Z$="R" AND QE=0 THEN LOCATE 25,1:PRINT SPACE$(31):RETURN
2726 IF Z$="R" AND QE=9 THEN 2720
2728 IF MID$(E$,Z,1)<>"P" THEN 2720
2729 MID$(E$,Z,1)="R"
2730 FOR N=1 TO 5
W(N,1)=0
NEXT N
2732 Q=7:sub$=" TO COME ON"
GOSUB 9500:z=z-32:sub$=""
2735 IF MID$(E$,Z,1)<>"S" THEN 2730
2737 MID$(E$,Z,1)="P"
SUBX=SUBX+1
IF SUBX=1
QE=9
LOCATE 25,1:PRINT "SECOND SUB Y/N ? "
x$=" ":DO WHILE x$<>"y" AND x$<>"n"
x$=INKEY$
LOOP
IF x$="y" THEN 2720
END IF
2740 G=1
Q=7
GOSUB 930
Q=9
GOSUB 2700
Q=0
2749 LOCATE 25,1:PRINT SPACE$(31):RETURN
' ---------------------
2800 IF fnr(150)+1>10 THEN RETURN
2810 IF AA>BB
SW2=ST2
SB2=20
GOTO 2830
END IF
2820 IF AA<BB
SW1=ST1
SB1=20
GOTO 2830
END IF
2825 SW1=ST1
SW2=ST2
SB1=20
SB2=20
2830 G=2
FG=88
GOSUB 981
FG=0
2855 SSB=2
SX=9
GOSUB click
RETURN
' ---------------------
2900 COLOR 7:ATT = 0:Q$=" ":Y=1
FOR N=1 TO 3
FOR F=1 TO 20
2910 IF S(N,F,3)=18
D(Y,1)=N
D(Y,2)=F
Y=Y+4
F=20
END IF
2912 NEXT F
NEXT N
2918 CC=0
Y=2
FOR N=2 TO 4
FOR F=1 TO 20
2920 IF (S(N,F,3)>2 AND S(N,F,3)<6)
D(Y,1)=N
D(Y,2)=F
Y=Y+1
CC=CC+1
END IF
2926 NEXT F
Y=Y+1
NEXT N
2930 IP=0
FOR N=1 TO 12
IF D(N,1)=OLD AND D(N,2)=1 THEN IP=N
2932 NEXT N
C=0
T=0
IF IP=0 THEN 2950
2933 I$="PLAY OFF MATCH"
CP=1
X5=fnr(4)+1
IF IP>4
X5=fnr(4)+5
IF IP>8 THEN X5=fnr(4)+9
END IF
2935 IF X5=T OR (D(X5,1)=LE AND D(X5,2)=1) THEN 2933
2937 PL=0
LY=D(X5,1)
OP=D(X5,2)
C=C+1
MHL=D(X5,1)
MHT=D(X5,2)
MAL=OLD
MAT=1
GOSUB 8300
GOSUB 8800
A2=AA
B2=BB
PL=1
MHL=OLD
MHT=1
MAL=D(X5,1)
MAT=D(X5,2)
GOSUB 8300
AA=AA+A2
BB=BB+B2
IF AA=BB THEN GOSUB 4070
2940 GOSUB 8800
IF AA>BB AND C<2
T=INT(X5)
GOTO 2933
END IF
2945 IF AA>BB THEN Y=IP
2946 IF BB>AA THEN Y=X5
2950 X1=fnr(4)+1
X2=fnr(4)+5
X3=fnr(4)+9
2952 IF IP<>0 AND IP<5 THEN X1=Y
2954 IF (IP>4 AND IP<9) THEN X2=Y
2956 IF IP>8 THEN X3=Y
2990 CLS
PRINT "PLAY OFF WINNERS"
Y=1
FOR N=1 TO 12
IF N<>X1 AND N<>X2 AND N<>X3
Y$=A$(D(N,1),D(N,2))
GOTO 2995
END IF
2991 PRINT
PRINT " ";A$(D(N,1),D(N,2));" ARE IN DIV ";fnd$(Y)
PRINT
Y=Y+1
2992 DV=1
IF Y>2
DV=5
IF Y>3 THEN DV=9
END IF
2993 IF D(N,1)<>Y-1
Z$=A$(D(N,1),D(N,2))
Y$=A$(D(DV,1),D(DV,2))
A$(D(N,1),D(N,2))=Y$
A$(D(DV,1),D(DV,2))=Z$
IF D(N,1)=LE AND D(N,2)=1
LE=LE-1
W$=Z$
END IF
END IF
2994 IF D(N,1)<>Y-1 AND (D(DV,1)=LE AND D(DV,2)=1)
LE=LE+1
W$=Y$
END IF
2995 NEXT N
IF O(1)=0
GOSUB click
END IF
2999 RETURN
' ---------------------
3000 CLS:COLOR hdg
PRINT "No PLAYER A AGE CON WAGE TL"
3005 FOR N=1 TO 22:COLOR txt
ZZ=N
GOSUB 9140
3010 LOCATE N+1,1:PRINT CHR$(N+64);FNTB$(4);B$(N);" ";FND$(Z3);" ";FND$(Z5);" ";FND$(i(2,n));" ";
PRINT fnd$(E(N));FNTB$(32);MID$(T$(N),1,1)
3015 NEXT N
3020 COLOR 2:LOCATE 24,1:PRINT SPACE$(30)
PRINT "(O)N (F)ROM (N)EG OR (R)ETURN"
w$="":DO WHILE w$<>"o" AND w$<>"f" AND w$<>"n" AND w$<>"r"
w$=INKEY$
LOOP
W$=UCASE$(W$)
3021 IF W$="R" OR (W$="N" AND (HR<1 OR MO<0))
W$=" "
GOTO 5000
END IF
3022 IF W$="N" THEN 3040
3023 Q=7
YY=20
GOSUB 9500:z=z-32
IF T$(Z)="D" OR T$(Z)="TD" THEN
CLS:LOCATE 3,1:COLOR 6
PRINT " ";b$(Z);" is already"
PRINT:PRINT " on the transfer list"
PRINT
IF T$(z)="D" THEN PRINT " at his own request"
IF T$(z)="TD" THEN PRINT " on the Chairman's":PRINT:PRINT " instruction"
GOSUB click
W$=" "
GOTO 3000
END IF
3025 IF T$(Z)<>"TD" THEN T$(Z)=" "
IF T$(z)="TD" AND W$="F" THEN
CLS:LOCATE 3,1:COLOR 6
PRINT " ";b$(Z);"has been placed"
PRINT:PRINT " on the transfer list"
PRINT:PRINT " by the Chairman and"
PRINT:PRINT " cannot be taken off"
PRINT:PRINT " until a new contract"
PRINT:PRINT " has been negotiated"
GOSUB click:GOTO 3000
END IF
IF W$="O" THEN T$(Z)="T"
3030 COLOR txt:LOCATE Z+1,32
PRINT MID$(T$(Z),1,1)
GOTO 3020
3040 Q=7
YY=20
GOSUB 9500:z=z-32
ZZ=Z
GOSUB 9140
IF i(2,z)=0
COLOR 7
LOCATE ZZ+1,4
PRINT B$(Z)
LY=LE
GOTO 3050
END IF
3042 GOTO 3020
3050 LY=LE
LOCATE 24,1:COLOR 2
PRINT "NUMBER OF SEASONS CONTRACT "
YY=5:PRINT SPACE$(30)
Q=8
GOSUB 9100
XX=Z:Z=0
3055 COLOR 2
LOCATE 24,1 PRINT "ANNUAL SALARY OFFER £";Z;" "
LOCATE 25,1:PRINT "(H)IGHER (L)OWER OR (O)FFER"
X$="":DO WHILE X$<>"h" AND X$<>"l" AND X$<>"o"
X$=INKEY$
LOOP
IF X$="h" AND z+1000<250001 THEN Z=Z+1000:GOTO 3055
IF x$="h" THEN 3055
IF X$="l" AND Z>1999 THEN Z=Z-1000:GOTO 3055
IF x$="l" THEN 3055
3060 GOSUB 9350
IF Z<T
LOCATE 24.1:PRINT SPACE$(30)
LOCATE 25,1:PRINT SPACE$(30)
LOCATE 25,1
PRINT "OFFER NOT ACCEPTED "
GOSUB WAIT_WHILE
GOSUB WAIT_WHILE
X=5
IF QQ<>9
COLOR txt
LOCATE ZZ+1,4
PRINT B$(ZZ)
GOSUB 9300
GOTO 3020
END IF
END IF
3061 IF QQ=9
LOCATE 24,1:PRINT SPACE$(32)
PRINT SPACE$(32):RETURN
END IF
3085 E(ZZ)=Z:i(2,zz)=xx:T$(zz)=" "
B&(ZZ)=B&(ZZ)+(XX*100)-(i(2,zz)*100)
COLOR txt
LOCATE ZZ+1,4:PRINT B$(ZZ)
LOCATE ZZ+1,23:PRINT fnd$(i(2,zz));" ";fnd$(E(ZZ))
3099 GOSUB 9300
GOTO 3020
' ---------------------
3200 IF IC=0 THEN RETURN
3201 GOSUB 8300
IF ma=8 OR ma=18 OR ma=25 OR ma=32 OR ma=45 OR ma=53 OR ma=61 THEN
IF aa=bb THEN GOSUB 4070
END IF
3202 FLG=0
3203 IF LG=1 AND CP=2
A2=AA
B2=BB
GOSUB 3290
FLG=9
GOTO 3250
END IF
3204 ps=0
IF MA=5 OR MA=15 OR MA=50
ps=2
IF A2+AA=B2+BB THEN GOSUB 4070:ps=1:psa=aa:psb=bb
END IF
3205 IF RE=1
RE=0
IF AA=BB THEN GOSUB 4070
IF aa>bb THEN GOTO 3250
END IF
3206 IF (ps=2 AND AA+a2>BB+b2 OR (ps=1 AND psa>psb)) AND CP=2 AND LG=2
Z1=B
Z2=C
GOSUB 9120
GOSUB 8101
NT=7
GOTO 3250
END IF
3207 IF AA>BB AND CP=3
Z1=O
Z2=R
GOSUB 9120
GOSUB 8101
NT=7
GOTO 3250
END IF
3208 IF (MA<>5 AND MA<>15 AND MA<>50) AND RE=0 AND (AA=BB AND (CP=2 AND LG=2))
RE=1
GOSUB 4090
GOTO 3250
END IF
3209 NT=9
3250 GOSUB 8800
RETURN
' ---------------------
3290 IF MA>55 THEN RETURN
3291 IF K$="HOME TO "
K$="AWAY TO "
RETURN
END IF
3292 K$="HOME TO "
RETURN
' ---------------------
3295 IF MA>51 THEN RETURN
3296 IF J$="HOME TO "
J$="AWAY TO "
RETURN
END IF
3297 J$="HOME TO "
RETURN
' ---------------------
3300 IF MW=40 THEN RETURN
3304 temp=99:W = 10
Y = 4
CLS:COLOR hdg
PRINT " MIDWEEK MATCHES"
3305 RA=9:COLOR 7
GOSUB 3385
Q=6
FOR N=1 TO 4
READ A
HT=A
READ A
OT=A
GOSUB 3387
GOSUB 7540
NEXT N
3307 IF O(2)=0 AND (MW=0 OR MW=24)
GOSUB 8300
END IF
3308 IF O(2)=1 OR (MW<>0 AND MW<>24)
GOSUB click
END IF
3310 IF MW=0 OR MW=24
GOSUB 8800
LM=LM+1
END IF
3320 FOR F=1 TO 5
Y=4
CLS:COLOR hdg
q=3:xx=f:GOSUB 7505
PRINT x$;" RESULTS"
GOSUB 3385
Q=6:COLOR 7
FOR N=1 TO 4
READ A
HT=A
READ A
OT=A
IF f=le
IF ht=1 THEN temp=0:xht=1:aa=w(ht,1):bb=w(ot,1)
IF ot=1 THEN temp=0:aa=w(ot,1):bb=w(ht,1)
END IF
GOSUB 3387
GOSUB 7625
3325 NEXT N
GOSUB 3380
IF O(1)=0 THEN GOSUB click
3330 NEXT F
3369 MW=MW+8
IF FS=1 AND MW=40
FS=2
MW=0
END IF
3370 RETURN
' ---------------------
3380 GOSUB 3385
FOR K=1 TO 4
READ A
GOSUB 7810
READ A
GOSUB 7810
NEXT K
RETURN
' ---------------------
3385 RESTORE 3399
FOR T=1 TO MW
READ A
NEXT T
RETURN
3387 IF FS=2
X=HT
HT=OT
OT=X
END IF
3388 RETURN
3399 DATA 1,15,6,19,3,9,11,20,11,18,4,17,9,15,5,8,8,14,7,12,2,3,10
DATA 16,1,12,10,20,4,16,13,17,2,7,13,19,5,14,6,18
' --------------------
3700 COLOR 1
3710 PRINT "Total crowd";TAB(24);w(1,1)
ls=INT(w(1,1)*.55):lt=w(1,1)-ls
PRINT "Looking for Seats";TAB(24);ls
PRINT "Available";TAB(24);rst(2)
PRINT "Looking for Standing";TAB(24);lt
PRINT "Available";TAB(24);rst(1)
3720 x=(6-le)*(20-d(1,8))
ms=x*50+INT(RND*100)
mt=x*100+INT(RND*100)
PRINT "L/P";d(1,8);" MS";ms;" MT";mt
3725 fc=3
IF d(1,8)<8 THEN fc=4
IF d(1,8)>14 THEN fc=2
PRINT "Price factor";TAB(24);fc
cs=(6-le)*fc
ct=(6-le)+(fc-1)
3728 z=(7-le)
PRINT "Facility Act";rst(5);" Rqd";z
er5=z-rst(5)
IF er5>0 THEN cs=cs-(er5*2)
IF er5>0 THEN ct=ct-er5
IF er5<0 THEN cs=cs+(er5*2)
IF er5<0 THEN ct=ct+er5
IF cs<0 THEN cs=2
IF ct<0 THEN ct=1
3730 PRINT "Correct Seat price";TAB(24);cs;TAB(29);rst(4)
PRINT "Correct Standing";TAB(24);ct;TAB(29);rst(3)
er1=0:er2=0:er3=0:er4=0
IF rst(4)>cs THEN er1=(rst(4)-cs)*((6-le)*400)
IF rst(3)>ct THEN er2=(rst(3)-ct)*((6-le)*400)
IF er1>0 THEN PRINT "Adj for seat o/c";TAB(24);er1
IF er2>0 THEN PRINT "Adj for stand o/c";TAB(24);er2
IF rst(4)<cs THEN er3=(cs-rst(4))*((6-le)*100)
IF rst(3)<ct THEN er4=(ct-rst(3))*((6-le)*100)
IF er3>0 THEN PRINT "Adj for seat u/c";TAB(24);er3
IF er4>0 THEN PRINT "Adj for stand u/c";TAB(24);er4
IF er1>0 THEN ls=ls-er1
IF er2>0 THEN lt=lt-er2
IF er3>0 THEN ls=ls+er3
IF er4>0 THEN lt=lt+er4
IF ls<ms THEN ls=ms
IF lt<mt THEN lt=mt
PRINT "Now looking for seats";TAB(24);ls
PRINT "Now looking standing";TAB(24);lt
hex=(6-le)*(rst(1)+(rst(2)*2))
IF ls>rst(2) THEN ls=rst(2)
IF lt>rst(1) THEN lt=rst(1)
3799 GOSUB click:CLS:RETURN
' ---------------------
3800 CLS:hex=0
REDIM W(20,2)
3808 RR=0.45:IF MHL=LE AND MHT=1 THEN RR=0.75
3809 RR=RR*(1+(MHL/3))
Y=21-S(MHL,MHT,3)
YY=21-S(MAL,MAT,3)
3810 X=(6-MHL)
XX=(6-MAL)
W(1,1)=(((X-1)*(X-1))*600+((Y*(X*3))*50)+((XX-1)*500)+((YY*(XX*2))*30))+ATT+(((X-1)*Y)*((X-1)*60))
IF cp=2 THEN w(1,1)=INT(w(1,1)*1.1)
IF cp=3 THEN w(1,1)=INT(w(1,1)*1.3)
W(2,1)=INT(W(1,1)*(((INT((9-MHL)/2))*RR)))
IF mht=1 AND mhl=le THEN
GOSUB 3700
w(1,1)=ls+lt
w(2,1)=(ls*rst(4))+(lt*rst(3))
END IF
3812 IF RA =0
HR=14-(DI*2):W(5,1)=INT((LO/100)*IR)
LO=LO+W(5,1)
IF fnr(10)+1>6 THEN IR=(fnr(50)+25)/100
END IF
3813 Q=9
GOSUB 6120
Q=0
W(3,1)=INT(X/40)
3814 W(4,1)=(INT(((6-LE)*(fnr(7)+1)*200)*((5-LE)*3)))+fnr(1000)+100
w(4,1)=w(4,1)+hex
3815 W(6,1)=W(2,1)-(W(3,1)+W(4,1))
MO=MO+W(6,1)
IF MO<0
ZZ=fnr(20)+1
IF B$(ZZ)<>"RESERVE "
i(2,zz)=0:t$(zz)="TD"
CLS:LOCATE 3,1:COLOR 6
PRINT " Due to financial problems"
PRINT:PRINT " the Directors have cancelled"
PRINT:PRINT " the contract of ";b$(zz)
PRINT:PRINT " and placed him on the"
PRINT:PRINT " transfer list":GOSUB click:CLS
END IF
END IF
3816 W(6,1)=W(6,1)-W(5,1)
3817 IF mht=1 AND w(1,1)>(rst(1)+rst(2)) THEN w(1,1)=(rst(1)+rst(2))
3820 DATA "ATTENDANCE","RECEIPTS £","WAGES £"
DATA "GENERAL EX £","LOAN INTEREST £","BALANCE £"
3825
LOCATE 1,5:COLOR hdg
PRINT "Financial Data"
3830 RESTORE 3820
Y=4:COLOR txt
FOR N=1 TO 6
READ Z$
LOCATE Y,5
PRINT Z$;FNTB$(23);W(N,1)
Y=Y+2
3899 NEXT N
att=w(1,1):rec=w(2,1):GOSUB click
CLS
RETURN
' ---------------------
3900 COLOR 3
X=INT(RND(1)*22)+3
X=X+INT(RND(1)*22)
IF (P=1 AND X>22) OR (P=2 AND X>15) THEN 3900
3905 IF (P=1 AND MID$(E$,X,1)<>"P") OR (P=2 AND (X= N1 OR X=N2 OR X=SB1 OR X=SB2)) THEN 3900
3910 IF P=1 AND W(8,1)<8
LOCATE W(8,1)+14,1
PRINT B$(X);" ";fnd$(M)
i(3,x)=i(3,x)+1
END IF
3912 IF P=2 AND W(8,2)<8
LOCATE W(8,2)+14,18
PRINT C$(H(X));" ";fnd$(M)
END IF
3999 RETURN
' ---------------------
4050 IF (CP=3 AND R1=7) OR (CP=2 AND R2=6)
I$="S-FINAL"
ATT=45000+INT(RND*5000)
END IF
4055 IF (CP=3 AND R1=8) OR (CP=2 AND R2=7)
I$="F I N A L "
ATT=85000+INT(RND*5000)
END IF
4060 RETURN
' ---------------------
4070 AA=fnr(5)+2:BB=fnr(5)+2
IF AA=BB THEN aa=aa+1
IF aa>bb THEN bb=aa-1:GOTO 4075
IF bb>aa THEN aa=bb-1
4075 FOR n=21 TO 26:LOCATE n,1:PRINT SPACE$(30):NEXT
LOCATE 21,2:COLOR 4
PRINT "PENALTY SHOOT OUT RESULT "
GOSUB click:COLOR 6
LOCATE 23,2:PRINT A$(LE,1);" ";fnd$(AA);" ";A$(LY,OP);" ";fnd$(BB)
GOSUB click:RETURN
' ---------------------
4090 IF CP=2
R2=R2-1
GOSUB 3290
END IF
4095 RETURN
' ---------------------
4100 IF fnr(70)+1<>18 OR M<10 THEN RETURN
4110 X=fnr(20)+1
IF MID$(E$,X,1)="P"
T(X)=T(X)+3
LOCATE 13,5
GOSUB WAIT_WHILE
PRINT " ";B$(X);" BOOKED "
GOSUB delay
RETURN
END IF
4112 GOTO 4110
' ---------------------
5000 CLS
5005 REM Main MENU
5010 DATA "[A] Edit ]","[B] Main ]","[C] Squad ]"
DATA "[D] Finance]","[E] Data ]","[F] Teams ]","[G] Games ]"
DATA "[H] Leagues]","[I] Options]","[J] Coach ]","[K] Med/Dis]"
DATA "[L] Terms ]","[M] Record ]"
DATA "[N] Cup ]","[O] Ground ]"
DATA "[P] Frndly ]","[Q] Results]","[R] Play ]"
5015 RESTORE 5010:COLOR 4
FOR N=2 TO 19
READ Z$
LOCATE N+2,1
PRINT Z$
NEXT N
5016 COLOR 4:IF HR<10
LOCATE 1,10
PRINT " "
END IF
5017 LOCATE 1,1
5018 PRINT "[HOURS = ";FND$(HR);"] "
IF Q=9 THEN RETURN
5099 IF Q=9 THEN RETURN
5100 QQ=0
Q=0
GOSUB 9090
5105 COLOR 3:IF Z$="A" THEN GOSUB 5500:z$=" "
5106 IF Z$="B" AND LM>1 THEN GOSUB 30:GOTO 5000
5108 IF Z$="C" THEN GOTO 70
5112 IF Z$="E" THEN GOSUB 5900
5113 IF Z$="D" THEN GOSUB 6100
5114 IF Z$="F" AND HR >=1 THEN GOSUB 6000
5116 IF Z$="G"
M=14
W=7
Q=9:xx=le
GOSUB PLAY_MATCH
Q=0
END IF
5118 IF Z$="H" THEN GOSUB 480
5119 IF Z$="I" THEN GOSUB 540
5120 IF Z$="J" AND HR >=1 THEN GOSUB 2422
5121 IF Z$="K" THEN 8900
5122 IF Z$="L" THEN 3000
5124 IF z$="M" AND (sn>1 OR d(1,1)>0) THEN GOSUB 5300
5125 IF z$="N" THEN GOTO c1000
5128 IF z$="O" THEN GOTO 5400
5130 IF z$="P" AND (ma<9 OR ma>50) THEN GOSUB 2200:GOTO 5000
5131 IF z$="Q" AND ma>1 THEN GOSUB 2300:GOTO 5000
5133 IF Z$="R"
M=4
Q=0
W=10:xx=le
GOTO PLAY_MATCH
END IF
5199 GOTO 5100
' ---------------------
5300 CLS:COLOR hdg:PRINT "Records for ";UCASE$(a$(le,1))
5305 COLOR 2:PRINT:PRINT TAB(12);"Current Sn All Sns"
5307 COLOR 1:PRINT "Won";TAB(14);rec(1);TAB(26);rec(2)
5309 PRINT "Drawn";TAB(14);rec(3);TAB(26);rec(4)
5311 PRINT "Lost";TAB(14);rec(5);TAB(26);rec(6)
5313 PRINT "For";TAB(14);rec(7);TAB(26);rec(8)
5315 PRINT "Against";TAB(14);rec(9);TAB(26);rec(10)
5320 COLOR 4:PRINT:PRINT "Winning run";TAB(20);rec(11)
5322 PRINT:PRINT "Unbeaten run";TAB(20);rec(12)
5324 PRINT:PRINT "Losing run";TAB(20);rec(13)
5326 COLOR 7:PRINT:PRINT "Biggest Crowd ";rec(14)
COLOR 6:PRINT rec$(1)
COLOR 7:PRINT "Record receipts £";rec(15)
COLOR 6:PRINT rec$(2)
5328 COLOR 7:PRINT "Record signing £";rec(16)
5399 GOSUB click:GOTO 5000
5400 CLS:COLOR hdg:PRINT "Stadium info for ";UCASE$(a$(le,1))
5410 COLOR 1:LOCATE 2,1:PRINT:PRINT "STANDING capacity :";rst(1)
5412 PRINT:PRINT "SEATED capacity :";rst(2)
PRINT:PRINT "TOTAL capacity :";rst(1)+rst(2)
5420 COLOR 7:LOCATE 9,1:PRINT "Ticket prices - STAND : £";rst(3)
LOCATE 11,1:PRINT " SEATS : £";rst(4)
COLOR 3:LOCATE 13,1:PRINT "FACILITY rating : ";rst(5)
COLOR 6:PRINT "Available Cash £";mo;" "
5425 ff=INT((rst(1)+rst(2))*2)*(6-le):ss=(6-le)*12000:tt=(6-le)*5000
5430 COLOR 2:PRINT:PRINT "Improve (F)acilities £";ff
PRINT "Add 500 (S)eats £";ss
PRINT "(C)onvert £";INT(ss/2)+tt
PRINT "Add 1000 s(T)anding £";tt
PRINT "(A)mend ticket price"
PRINT "(R)eturn"
5460 x$="":DO WHILE x$<>"r" AND x$<>"a" AND x$<>"f" AND x$<>"c" AND x$<>"s" AND x$<>"t"
x$=INKEY$
LOOP
5470 IF x$="f" AND rst(5)<9 AND mo=>ff THEN rst(5)=rst(5)+1:mo=mo-ff
IF x$="s" AND rst(2)<40000 AND mo=>ss THEN rst(2)=rst(2)+500:mo=mo-ss
IF x$="t" AND rst(1)<20000 AND mo=>tt THEN rst(1)=rst(1)+1000:mo=mo-tt
IF x$="c" AND rst(1)>1000 AND rst(2)<39500 AND mo=>(ss+tt) THEN
rst(1)=rst(1)-1000
rst(2)=rst(2)+500
mo=mo-(ss+tt)
END IF
IF x$="a" THEN GOSUB 5480:GOTO 5400
5475 IF x$="r" THEN GOTO 5000
5479 GOTO 5410
5480 CLS:COLOR 3:PRINT " Amend ticket prices"
5485 LOCATE 3,1:COLOR 1
PRINT " STANDING @ £";rst(3)
PRINT:PRINT " SEATS @ £";rst(4)
5487 COLOR 2:LOCATE 9,1
PRINT " A) Increase STANDING price"
PRINT " B) Decrease STANDING price"
PRINT " C) Increase SEAT price"
PRINT " D) Decrease SEAT price"
PRINT " E) RETURN"
5490 x$="":DO WHILE x$<>"a" AND x$<>"b" AND x$<>"c" AND x$<>"d" AND x$<>"e"
x$=INKEY$
LOOP
5491 IF x$="e" THEN RETURN
5492 IF x$="a" AND rst(3)<rst(4) THEN rst(3)=rst(3)+1
IF x$="b" AND rst(3)>1 THEN rst(3)=rst(3)-1
IF x$="c" AND rst(4)<((5-le)*5)+20 THEN rst(4)=rst(4)+1
IF x$="d" AND rst(4)>rst(3) THEN rst(4)=rst(4)-1
5495 GOTO 5485
5500 COLOR 2:LOCATE 25,1:PRINT "EDIT (T)EAMS OR (P)LAYERS"
z$="":DO WHILE z$<>"t" AND z$<>"p"
z$=INKEY$
LOOP:z$=UCASE$(z$)
5593 IF Z$="P"
GOSUB 5810
RETURN
END IF
5600 LOCATE 24,1:PRINT "DIVISION"
Q=8:GOSUB 9100
5691 ZZ=Z
GOSUB 5700
5699 GOSUB CLEAR_RIGHT_WINDOW
RETURN
' ---------------------
5700 LOCATE 24,1:PRINT SPACE$(30)
FOR N=1 TO 20:COLOR 3
5711 LOCATE N,15
PRINT CHR$(N+64);FNTB$(20);A$(ZZ,N)
NEXT N
5717 YY=20
Q=9
GOSUB 9100
5720 IF Z$="R" THEN RETURN
5730 LOCATE 24,1:PRINT SPACE$(28):LOCATE 24,1:PRINT "NEW NAME (MAX 10) -"
LOCATE 25,1:PRINT SPACE$(28):LOCATE 25,1:LINE INPUT z$
Z$=UCASE$(Z$)
INPUT_RESTORE
IF LEN (Z$)>10 THEN 5730
5735 STRSET A$(ZZ,Z-32),Z$
GOTO 5700
' ---------------------
5810 FOR N=1 TO 22:COLOR 3
5811 LOCATE N,15
PRINT CHR$(n+64);FNTB$(20);B$(N)
NEXT N
5817 YY=20
Q=9:LOCATE 24,1:PRINT SPACE$(30)
GOSUB 9500:z=z-32
IF Z>0 AND Z<20
PAUSE 1
IF B$(Z)="RESERVE " THEN Z$="R"
END IF
5820 IF Z$="R"
GOSUB CLEAR_RIGHT_WINDOW
RETURN
END IF
5830 COLOR 2
LOCATE 24,1:PRINT SPACE$(28):LOCATE 24,1:PRINT "NEW NAME (MAX 10) -"
LOCATE 25,1:PRINT SPACE$(28):LOCATE 25,1:LINE INPUT z$
Z$=UCASE$(Z$)
INPUT_RESTORE
IF LEN (Z$)<4 THEN 5830
5831 IF LEN (Z$)>10 OR LEFT$(Z$,4)="RESE" THEN 5830
5835 STRSET B$(Z),Z$
GOTO 5810
' ---------------------
5900
LOCATE 1,13:COLOR hdg
PRINT " D A T A "
5915
5916 RESTORE 5915:COLOR txt
LOCATE 3,14
PRINT M$
LOCATE 5,14
PRINT A$(LE,1)
LOCATE 7,14
PRINT "SEASON"
LOCATE 7,29
PRINT FND$(SE)
LOCATE 8,14
PRINT "DIVISION"
LOCATE 8,29
PRINT FND$(LE)
LOCATE 9,14
PRINT "SKILL LEVEL"
LOCATE 9,29
PRINT FND$(DI)
LOCATE 10,14
PRINT "DIFFICULTY"
LOCATE 10,29
PRINT FND$(SK)
LOCATE 11,14
PRINT "L.M. PLAYED"
LOCATE 11,29
PRINT FND$(LM-1)
5917
5918
5919
5929 IF ST<2 AND MA<59 AND B>0
LOCATE 13,14:PRINT "LC ";LEFT$(A$(B,C),8);" ";B;" ";LEFT$(K$,1)
END IF
5930 IF st<>3 AND ma<62 AND st<>1 AND O>0 THEN
LOCATE 15,14:PRINT "FA ";LEFT$(a$(O,R),8);" ";O;" ";LEFT$(j$,1)
END IF
5944 IF MA>44
LOCATE 17,14
PRINT "TRANSFER D'DLINE"
END IF
5950 GOSUB click
5999 GOSUB CLEAR_RIGHT_WINDOW
RETURN
' ---------------------------
6000 Q=8
YY=5
GOSUB 9100
Z1=Z
6015 FOR n=1 TO 20:COLOR 3
LOCATE N,14
PRINT CHR$(n+64);" ";FNTB$(18);
PRINT A$(Z1,N);" "
NEXT N
6016 Q=7
YY=20
GOSUB 9100:z=z-32
Z2=Z
6017 IF Z2=1 AND Z1=LE THEN 6016
6040 GOSUB CLEAR_RIGHT_WINDOW:COLOR 3
LOCATE 1,14
PRINT A$(Z1,Z2);" ";
IF Z1<5 THEN PRINT "DIV ";FND$(Z1)
6042 GOSUB 9120
VM=Z2
DM=Z1
YM=Z3
6047 XM=Z1+(Z2-1)+Z3-Z4+Z6
ZM=Z4:TM=Z2
6050 Y$="5 -3 -2"
IF Z4>2
Y$="4 -4 -2"
IF Z4=4 THEN Y$="4 -3 -3"
END IF
6052 LOCATE 2,14
PRINT "(";Y$;" )"
6060 Y=1
FOR N=XM TO (XM+(ZM*14)) STEP ZM
6062 LOCATE Y+3,14:PRINT CHR$(y+64);FNTB$(17);C$(N);" ";MID$(H$,Y,1);" ";
6075 ZZ=N+ZM
GOSUB 9130
PRINT FND$(Z3+INT(YM/1.55))
6080 Y=Y+1
NEXT N:q=9:GOSUB 5016:q=0
6086 LOCATE 25,1:COLOR 2
PRINT "(R)ETURN (M)ORE (P)LAYER"
COLOR 3
IF XT=99
XT=0
GOTO 6099
END IF
END_LOOP = 0
JAY$=INKEY$
JAY$=UCASE$(JAY$)
SELECT CASE JAY$
CASE "P"
END_LOOP = 1
CASE "M"
END_LOOP = 2
CASE "R"
END_LOOP = 3
END SELECT
IF END_LOOP = 0 THEN 6086
IF END_LOOP = 1 THEN 6200
IF END_LOOP = 2
IF HR>0 THEN SUB_MENU_F
END IF
6099 GOSUB CLEAR_RIGHT_WINDOW
RETURN
SUB_MENU_F:
GOSUB CLEAR_RIGHT_WINDOW
GOTO 6015
' ---------------------
6100 LOCATE 1,13:COLOR hdg
PRINT " FINANCE "
LOCATE 6,14:COLOR txt
PRINT "BANK BL £";FND$(MO)
6102 LOCATE 8,25
PRINT " "
LOCATE 8,14
PRINT "BANK LN £";FND$(LO)
6110 OV=100000*((6-LE)*(4-DI))
LOCATE 10,14
PRINT "MAX LOAN £";FND$(OV)
6115 LOCATE 12,14
PRINT "INTEREST ";USING "##.##";IR;
PRINT "%"
6120 X=0
FOR N=1 TO 22
X=X+E(N)
NEXT N
IF Q=9 THEN RETURN
6122 LOCATE 14,14
PRINT "WAGES PW £";FND$(INT(X/40))
6130 Q=9
GOSUB 5016
Q=0:COLOR 2:LOCATE 25,1:PRINT "(V)ISIT BANK OR (R)ETURN"
z$="":DO WHILE z$<>"v" AND z$<>"r"
z$=INKEY$
LOOP
IF Z$="r" THEN
Z$=" "
GOTO 6199
END IF
6130 LOCATE 25,1:PRINT "(B)ORROW OR (P)AY BACK "
z$="":DO WHILE z$<>"b" AND z$<>"p"
z$=INKEY$
LOOP
IF z$="b" AND hr<4 THEN 6100
6140 z=0:IF Z$="p" THEN GOTO 6148
6140 COLOR 7:LOCATE 24,1 PRINT "LOAN REQUIRED £";Z
COLOR 2:LOCATE 25,1:PRINT "(H)IGHER (L)OWER OR (A)GREE"
X$="":DO WHILE X$<>"h" AND X$<>"l" AND X$<>"a"
X$=INKEY$
LOOP
IF X$="h" AND (LO+z+100000<OV+1) THEN Z=Z+100000:GOTO 6140
IF x$="h" THEN 6140
IF X$="l" AND Z>199999 THEN Z=Z-100000:GOTO 6140
IF x$="l" AND z<200000 THEN 6140
6145 MO=MO+Z
LO=LO+Z
GOSUB CLEAR_RIGHT_WINDOW
hr=hr-4:GOTO 6100
6148 Z=MO:IF Z>LO THEN Z=LO
6149 IF Z<0 THEN z=0
6150 COLOR 7:LOCATE 24,1 PRINT "HOW MUCH TO PAY OFF £";Z
COLOR 2:LOCATE 25,1:PRINT "(L)OWER OR (A)GREE "
X$="":DO WHILE X$<>"l" AND X$<>"a"
X$=INKEY$
LOOP
IF X$="l" AND Z>0 THEN Z=Z-10000:GOTO 6149
6155 MO=MO-Z
LO=LO-Z
GOSUB CLEAR_RIGHT_WINDOW
GOTO 6100
6199 GOSUB CLEAR_RIGHT_WINDOW
RETURN
' ---------------------
6200 Q=6
YY=15
GOSUB 9100
z=z-32:P=Z
PP=Z
GOSUB CLEAR_RIGHT_WINDOW:
6215 FOR N=XM TO XM+((P-1)*ZM)
NEXT N
Y$=C$(N-1)
YZ=N-1
6220 ZZ=N-1+ZM
GOSUB 9130
LOCATE 3,15:COLOR 7
PRINT Y$
6222 LOCATE 5,15
PRINT "AGE ";FND$(Z5)
6223 Z3=Z3+INT(YM/1.55)
6224 LOCATE 7,15
PRINT "SKILL ";
PRINT FND$(Z3)
6225 LOCATE 9,15
PRINT "FORM ";FND$(Z4)
6226 y$=MID$(h$,z,1):x$="G/Keeper":IF y$="D" THEN x$="Defender"
6227 IF y$="M" THEN x$="Midfield"
6228 IF y$="F" THEN x$="Forward"
6229 LOCATE 11,15
PRINT UCASE$(x$)
6230 CO=INT((5-DM)*20)+(Z3*20)+(Z4*2)
6231 IF DM=5 THEN CO=INT(CO*0.6)
6232 IF PP>12 THEN CO=INT(CO*1.7)
6233 IF Z3>6
CO=CO*3
IF Z3=9 THEN CO=INT(CO*2)
END IF
6234 IF Z5>29 THEN CO=INT(CO*.6)
6235 CO=CO*1000
6237 IF Q=9 THEN RETURN
6238 LOCATE 13,15
PRINT "£";FND$(CO)
6280 COLOR 2:LOCATE 25,1
PRINT "(R)ETURN OR (O)FFER"
END_LOOP = 0
JAY$=INKEY$
JAY$=UCASE$(JAY$)
SELECT CASE JAY$
CASE "O"
END_LOOP = 2
CASE "R"
END_LOOP = 1
END SELECT
IF END_LOOP = 0 THEN 6280
IF END_LOOP = 2
IF MA < 45 THEN GOSUB 430
IF OF < CO THEN 6280
END IF
6299 Z4=ZM
Q=9
GOSUB 5005
Q=0
GOTO 6040
6500 RETURN
' ---------------------
PLAY_MATCH:
U$="11212113151121211315111135214113152141214111315212113152141135"
IF (MA=62 AND RE=0) OR MA=63 THEN 1090
7001 xht=0:ATT=0:temp=0
I$=" "
Q$="LEAGUE"
RA=0
IF MFG=99 THEN 7014
7002 Z$=MID$(U$,MA,1)
CP=VAL(Z$):IF cp>3 THEN temp=99
IF (CP=1 OR CP=3) AND (fnr(3)+1=3 OR MA>49) AND MA>10 AND MW<40 AND MFG=0
MFG=99
GOTO 7014
END IF
7003 IF MFG=77 THEN MFG=55
7005 I$=" "
IF O(2)=1 AND CP=1 THEN A&(LE,1)=(6-LE)*10000+3000
7010 IF ((CP=2 AND R2<7) OR CP>3)
RA=7
IF CP>3
CP=CP-2
IF RE=0 THEN RA=6
END IF
END IF
7012 IC= 1
IF RA=6 OR (CP=2 AND ST>1) OR (CP=3 AND (ST=1 OR ST=3))
IF CP=3 AND temp=0 THEN r1=r1+1
GOTO 7495
END IF
7014 IF MFG=99 AND M<>14
MFG=77
CP=1
GOSUB 3300:IF temp=0 THEN GOSUB x7500
IF Q=6
Q=0
GOTO 5000
END IF
END IF
7015 IF MFG=99
LOCATE 3,15
PRINT "MIDWEEK MATCH"
GOSUB 9170
GOSUB CLEAR_RIGHT_WINDOW
RETURN
END IF
7024 IF CP=1
GOSUB 7505
IF Q=0
GOSUB 7600
LM=LM+1
MM=MM+1
GOSUB 200
GOTO 7033
END IF
END IF
7025 IF Q=0 THEN CLS
7026 IF CP=2
Q$="LEAGUE CUP "
LOCATE 1,M
PRINT Q$
IF (LE=5 OR (LE<3 AND R2=1)) OR ST= 2 OR ST=3 THEN IC=0
END IF
7027 IF CP=3
Q$="F. A. CUP "
LOCATE 1,M
PRINT Q$
IF (LE<3 AND R1=2) OR ST=1 OR ST=3 THEN IC=0
END IF
7028 LG=2
IF MA=3 OR MA=13 OR MA=48 THEN LG=1
7029 IF CP=2
Q$=Q$+"ROUND "+FND$(R2)
LOCATE 2,M
PRINT "ROUND ";fnd$(R2);
z$="1st Leg":IF lg=2 THEN z$="2nd Leg"
IF MA<16 OR MA=48 OR MA=50 THEN PRINT " - ";z$
GOSUB wait_while
END IF
7030 IF CP<>1 THEN GOSUB 4050
IF CP=3
Q$=Q$+"ROUND "+FND$(R1)
LOCATE 2,M
PRINT "ROUND ";fnd$(R1)
IF IC=1
LOCATE 4,m
PRINT j$;a$(o,r)
HT=1
W$=J$
LY=O
OP=R
LOCATE 5,M
PRINT I$
END IF
GOSUB wait_while
END IF
7031 IF CP=2 AND IC=1
LOCATE 4,M
PRINT K$;A$(B,C)
HT=1
LY=B
W$=K$
OP=C
LOCATE 5,M
PRINT I$
END IF
7032 IF RE=1 AND CP>1
I$="REPLAY"
LOCATE 3,M
PRINT I$
MFG=55
END IF
7033 IF Q=9 AND CP>1
GOSUB 9170
GOSUB CLEAR_RIGHT_WINDOW
RETURN
END IF
7034 IF Q=9
GOSUB CLEAR_RIGHT_WINDOW
RETURN
END IF
7035 IF CP=3 AND temp=0 THEN R1=R1+1
7036 IF CP=2 AND LG=2 THEN R2=R2+1
7040 IF CP>1
GOSUB 3200
IF RE=0 AND ((CP=3 AND R1<9) OR (CP=2 AND LG=2 AND R2<8))
GOSUB 8070
LG=1
END IF
END IF
7490 IF MFG=55 THEN MFG=0
7495 IF ma=8 OR ma=18 OR ma=25 OR ma=32 OR ma=45 OR ma=53 OR ma=61 THEN GOSUB c2000:
7499 MA=MA+1
GOSUB x7500:GOTO 5000
x7500: IF cp=1 THEN GOSUB 30
x7502: IF temp<>0 OR (cp<>1 AND le<3 AND ma<12) OR (cp=2 AND le=5) THEN RETURN
x7503: rmc=rmc+1:res%(rmc,1)=ly:res%(rmc,2)=op:res%(rmc,3)=aa
res%(rmc,5)=cp:IF xht<>1 THEN res%(rmc,5)=res%(rmc,5)+10
res%(rmc,4)=bb
res%(rmc,6)=att
x7505: IF aa>bb THEN rec(1)=rec(1)+1:rec(2)=rec(2)+1
IF aa=bb THEN rec(3)=rec(3)+1:rec(4)=rec(4)+1
IF aa<bb THEN rec(5)=rec(5)+1:rec(6)=rec(6)+1
rec(7)=rec(7)+aa:rec(8)=rec(8)+aa
rec(9)=rec(9)+bb:rec(10)=rec(10)+bb
x7510: IF aa>bb THEN
rec(21)=rec(21)+1:IF rec(21)>rec(11) THEN rec(11)=rec(21)
rec(22)=rec(22)+1:IF rec(22)>rec(12) THEN rec(12)=rec(22)
rec(23)=0
END IF
IF aa=bb THEN
rec(22)=rec(22)+1:IF rec(22)>rec(12) THEN rec(12)=rec(22)
rec(21)=0:rec(23)=0
END IF
IF aa<bb THEN
rec(23)=rec(23)+1:IF rec(23)>rec(13) THEN rec(13)=rec(23)
rec(21)=0:rec(22)=0
END IF
x7520: IF xht=1 AND att>rec(14) THEN rec(14)=att:rec$(1)=a$(ly,op)
IF xht=1 AND rec>rec(15) THEN rec(15)=rec:rec$(2)=a$(ly,op)
x7599: RETURN
7505 x$="PREMIER LEAGUE":IF xx=2 THEN x$="DIVISION ONE"
7506 IF xx=3 THEN x$="DIVISION TWO"
7507 IF xx=4 THEN x$="DIVISION THREE"
7508 IF xx=5 THEN x$="NON LEAGUE"
7509 IF q=3 THEN q=0:RETURN
7520 IF Q=0
CLS:COLOR hdg
LOCATE 1,1
PRINT x$;" FIXTURES"
END IF
7530 Y=3:X=1
FOR N=1 TO 10
GOSUB 1300
COLOR txt:IF (HT=1 OR OT=1) THEN COLOR 7
7540 LOCATE Y,M
PRINT LEFT$(A$(LE,HT),W);
PRINT " V ";
PRINT LEFT$(A$(LE,OT),W)
Y=Y+2
X=X+2
7541 IF HT=1
MHT=1
MAT=OT
MHL=LE
MAL=LE
LY=MAL
OP=MAT
END IF
7542 IF OT=1
MHT=HT
MAT=1
MHL=LE
MAL=LE
LY=MHL
OP=MHT
END IF
7543 IF Q=6 THEN RETURN
7544 NEXT N
IF Q=0 AND O (2)=0 THEN GOSUB 8300
7546 IF Q=9
GOSUB click
RETURN
END IF
7549 GOSUB click
A=0
GOSUB 8800
7555 RETURN
' ---------------------
7600 FOR F=1 TO 5
CLS
REDIM W(20,2)
R7605: xx=f:q=3:GOSUB 7505
R7608: COLOR hdg:PRINT x$;" RESULTS"
R7614: X=1
Y=3:COLOR 7
FOR N=1 TO 10:GOSUB 1300
7625 Z3=INT((A&(F,HT)/10000))
ZM=Z3
Z3=INT((A&(F,OT)/10000))
R7632: HC=3.5+(INT((20-S(F,HT,3))/10))+INT((ZM-Z3)/1.7)
IF HC<0 THEN HC=1
R7633: AC=2.5+(INT((20-S(F,OT,3))/10))+INT((Z3-ZM)/1.7)
IF AC<0 THEN AC=0
R7635: IF HT<1 OR HT>20 OR OT<1 OR OT>20
LOCATE 1,1
PRINT HT,OT
ROB$=INPUT$(1)
END IF
W(HT,1)=INT((RND(1)*HC)+0.6)
W(OT,1)=INT((RND(1)*AC)+0.4)
R7637: W(OT,2)=W(HT,1)
W(HT,2)=W(OT,1)
R7639: IF O(2)=1 THEN R7650
R7640: IF F=LE AND HT=1
W(HT,1)=AA
W(OT,2)=AA
W(HT,2)=BB
W(OT,1)=BB
END IF
R7642: IF F=LE AND OT=1
W(HT,1)=BB
W(OT,2)=BB
W(HT,2)=AA
W(OT,1)=AA
END IF
R7650: LOCATE Y,2
PRINT A$(F,HT);" ";FND$(W(HT,1));" ";A$(F,OT);" ";FND$(W(OT,1))
Y=Y+2
X=X+2
R7665: IF Q=6 THEN RETURN
IF f=le
IF ht=1 THEN xht=1:aa=w(ht,1):bb=w(ot,1)
IF ot=1 THEN aa=w(ot,1):bb=w(ht,1)
END IF
R7670: NEXT N
R7675: GOSUB 7800
IF O(1)=0
GOSUB click
END IF
R7680: NEXT F:RETURN
' ---------------------
7800 X=1
FOR N=1 TO 20
7805 IF MM<17
A=VAL(MID$(V$(MM+1),X,2))
X=X+2
END IF
7806 IF MM>16
A=VAL(MID$(V$((MM+1)-17),X,2))
X=X+2
END IF
7810 IF F<>LE THEN 7840
7815 D(A,1)=D(A,1)+1
7820 IF W(A,1)>W(A,2)
D(A,2)=D(A,2)+1
D(A,7)=D(A,7)+3
END IF
7822 IF W(A,1)<W(A,2) THEN D(A,4)=D(A,4)+1
7824 IF W(A,1)=W(A,2)
D(A,3)=D(A,3)+1
D(A,7)=D(A,7)+1
END IF
7826 D(A,5)=D(A,5)+W(A,1)
D(A,6)=D(A,6)+W(A,2)
7840 IF W(A,1)>W(A,2) THEN S(F,A,2)=S(F,A,2)+3
7842 S(F,A,1)=S(F,A,1)+1
7844 IF W(A,1)=W(A,2) THEN S(F,A,2)=S(F,A,2)+1
7850 IF Q=6 THEN RETURN
7870 NEXT N
RETURN
' ---------------------
8020 Z1=fnr((7-R2))+1
IF Z1>5 OR (CP=3 AND Z1>4) THEN 8020
8030 Z2=fnr(19)+2
8035 GOSUB 9120
8038 IF Z5=3 OR (CP=2 AND Z5=2) OR (CP=3 AND Z5=1) THEN 8020
8040 IF CP=2
B=Z1
C=Z2
RETURN
END IF
8050 IF CP=3 THEN RETURN
8070 IF NT=9 THEN GOSUB 8150
8072 IF NT<>9 AND B<>0 AND CP=2
Z1=B
Z2=C
GOSUB 9120
GOSUB 8101
END IF
8074 IF NT<>9 AND O<>0 AND CP=3
Z1=O
Z2=R
GOSUB 9120
GOSUB 8101
END IF
8090 IF LE<3 AND ((CP=2 AND R2=2) OR (CP=3 AND R1=3)) THEN IC=1
8098 IF NT<>9 AND IC=1 THEN GOSUB 725
8099 NT=0
IC=0
Q=0
RETURN
' ---------------------
8101 IF Z5=0 AND CP=2 THEN Z5=2
8102 IF (Z5=1 AND CP=2) OR (Z5=2 AND CP=3) THEN Z5=3
8105 IF Z5=0 AND CP=3 THEN Z5=1
8110 Z=Z3*10000+Z4*1000+Z5*100+Z6
A&(Z1,Z2)=Z
RETURN
' ---------------------
8150 IF CP=2 AND ST=0
ST=2
RETURN
END IF
8152 IF CP=3 AND ST=0
ST=1
RETURN
END IF
8154 ST=3
RETURN
' ---------------------
8200 FOR N=1 TO 20
Z1=5
Z2=N
GOSUB 9120
CP=2
GOSUB 8101
NEXT N
CP=0
RETURN
' ---------------------
8300 SX=0:replay=0:GOSUB click
8301 IF replay=1
IF w$="HOME TO " THEN w$="AWAY TO ":replay=2
IF replay=1 AND w$="AWAY TO " THEN w$="HOME TO "
GOSUB 8800:GOSUB x7500
IF xht=1 THEN xht=0
game$=" "+A$(LE,1)+" "+W$+" "+A$(LY,OP)+" "
END IF
GOSUB 800:CLS
SX=0:P=1:PP=2
IF replay=2 AND MHT=1 THEN MHT=OP
IF replay=1 AND MHT<>1 THEN MHT=1:MHL=LE
IF HT<>1
P=2
PP=1
END IF
IF w$="HOME TO " THEN xht=1
8302 IF MHT=1
W(20,1)=INT(W(3,1)*0.25)
GOTO 8304
END IF
8303 W(20,2)=INT(W(3,2)*0.3)
8304 Q=3
8305 IF SX<>1 THEN W(5,2)=40+(6-LY)+CP+(fnr(4)+1)
8345 FOR N=1 TO 20:COLOR 4
LOCATE N,1
PRINT SPACE$(31)
IF Q<>3 AND N=14
N=20
Q=0
END IF
8347 NEXT N
DATA " G/KEEPER "," DEFENCE "," MIDFIELD "," FORWARD "
DATA " FIT/FORM "," ","POSSESSION"," SHOTS "," GOALS "
8348 RESTORE 8347
FOR N=1 TO 9:COLOR 7
IF n>5 THEN COLOR 4
READ Z$
LOCATE N+2,11
PRINT Z$
NEXT N
8389 IF SX<>0 THEN RETURN
8390 SUBX=0
SSB=0
GA=0
CL=0
S1=0
S2=0
AA=0
BB=0
FOR N = 6 TO 8
W(N,1)=0
W(N,2)=0
NEXT N
8400 FOR M=1 TO 90
8410 LOCATE 1,1:COLOR 1:PRINT game$
8420 cc=3:FOR N=1 TO 8
LOCATE CC,7:COLOR 6
PRINT fnd$(W(N,1))
LOCATE CC,23
PRINT fnd$(W(N,2))
CC=CC+1
8425 IF N=5 THEN CC=CC+1
8452 NEXT N
GOSUB delay
LOCATE 17,15:COLOR 1
PRINT fnd$(M) ' Print Elapsed time
L=6
CC=8
W(10,1)=1
W(10,2)=OP
8457 IF GA=0 AND SSB<2 AND (M>50 AND M<80)
GOSUB 2800
IF SX >2 THEN GOSUB 8305
END IF
8460 GA=0
IF M>20 THEN GOSUB 4100
8462 LOCATE 13,5
PRINT SPACE$(24)
8463 IF replay>0 THEN COLOR 1:LOCATE 26,1:PRINT "Replay"
8465 IF M=1 OR M=45 THEN
FOR n=24 TO 26:LOCATE n,1:PRINT SPACE$(31):NEXT
GOSUB click
END IF
8466 IF PL=1 OR MA=5 OR MA=15 OR MA=50
LOCATE 26,1:COLOR 1
PRINT "1ST LEG (";fnd$(A2);" - ";fnd$(B2);")"
END IF
8467 IF M=2 OR M=46 THEN GOSUB 9300
8470 LOCATE 25,1:COLOR 4
PRINT Q$;" ";I$
LOCATE 17,15:COLOR 1
PRINT fnd$(M)
8471 X=0
XX=W(20,PP)
X=W(20,P)
IF W(5,P)>(W(5,PP)+5)
X=X+2
IF M>55 THEN X=X+5
END IF
8473 IF W(2,1)<W(4,1) AND P<>1 THEN X=X+((W(4,1)-W(2,1))*4)
8480 IF fnr(W(3,PP))+XX+5>fnr(W(3,P))+X
X=P
P=PP
PP=X
END IF
8490 W(6,P)=W(6,P)+1
LL=LY
IF P=1 THEN LL=LE
8520 IF SX=0 AND M<89 AND fnr(W(4,P))>fnr(W(2,PP)) AND fnr((W(8,P))+1)<3
W(7,P)=W(7,P)+1
GA=1
LOCATE 13,7:COLOR 7
PRINT A$(LL,W(10,P));" SHOOT !"
GOSUB delay
END IF
8530 IF GA=1 AND INT((((fnr((W(4,P)/5)+1)+fnr(6))> INT(fnr((W(1,PP)+1)+fnr(7)))/100))/3.42)
IF FNR(10) > 7.5
W(8,P)=W(8,P)+1
GA=2
GOSUB 2143
END IF
END IF
IF P = 2
IF GA = 1 AND W(1,1)=0
IF FNR(10) <8
W(8,P)=W(8,P)+1
GA=2
GOSUB 2143
END IF
END IF
END IF
8570 SX=0
IF GA=0 AND SUBX<2 AND M>2 AND M<88
JAY$=INKEY$
JAY$=UCASE$(JAY$)
IF JAY$ ="S"
GOSUB 2700
SX=1
GOSUB 8305
END IF
END IF
8590 jay$=INKEY$
IF jay$=CHR$(29) AND speed>1 THEN speed=speed-1
IF jay$=CHR$(28) AND speed<9 THEN speed=speed+1
8599 COLOR 4:LOCATE 24,27:PRINT "Speed"
LOCATE 25,27:PRINT "[";STR$(speed);" ]"
8750 NEXT M
8760 FOR n=24 TO 26:LOCATE n,1:PRINT SPACE$(31):NEXT
LOCATE 25,1:INPUT "Enter your score ";aa
LOCATE 25,1:INPUT "Enter other score ";bb
8765 IF (ma=8 OR ma=18 OR ma=25 OR ma=32 OR ma=45 OR ma=53 OR ma=61) AND aa=bb AND replay=0 THEN replay=1:GOTO 8301
8770 RETURN
' ---------------------
8800 GOSUB 3800:CLS
FOR N=1 TO 22
ZZ=N
GOSUB 9140
8801 IF (INT(fnr(100)+1>80)) AND IP=0 AND Z4>1 THEN Z4=INT(Z4-1)
8802 IF (O(2)=0 OR CP>1) AND (MID$(E$,N,1)="P" OR MID$(E$,N,1)="R")
F(N)=INT(F(N)+1)
END IF
8804 IF MID$(E$,N,1)="R" OR MID$(E$,N,1)="S" THEN MID$(E$,N,1)=" "
8805 IF MID$(E$,N,1)="I" THEN Z4=INT(1)
8815 z=(z3*10000000)+(z4*1000000)+(z5*10000)+(z6*1000)
b&(n)=z
IF Q=9 THEN RETURN
8816 IF MID$(E$,N,1)="1" THEN MID$(E$,N,1)=" "
8817 IF MID$(E$,N,1)="2" THEN MID$(E$,N,1)="1"
8818 IF T(N)>11
MID$(E$,N,1)="2"
T(N)=0
END IF
8819 IF RA= 0 AND i(1,N)>0
i(1,N)=i(1,N)-1
GOTO 8821
END IF
8820 IF N>2 AND i(1,N)=0 AND (MID$(E$,N,1)="P" OR MID$(E$,N,1)="R") AND fnr(38)+1=20
i(1,N)=fnr(18)+1
IF i(1,N)>3 AND B&(N)>20000000
B&(N)=B&(N)-10000000
IF Z5<32 THEN B&(N)=B&(N)+1000
END IF
END IF
8821 IF i(1,N)>0 THEN MID$(E$,N,1)="I"
8822 IF i(1,N)=0 AND (MID$(E$,N,1)<>"1" AND MID$(E$,N,1)<>"2" AND MID$(E$,N,1)<>"P")
MID$(E$,N,1)=" "
END IF
8824 NEXT N
IF CP>1 AND O(1)=0
GOSUB click
END IF
8839 RETURN
' ---------------------
8900 CLS:COLOR hdg
PRINT FNTB$(14);"DIS PTS INJURIES"
8910 FOR N=1 TO 22:COLOR txt
LOCATE N+1,3
PRINT B$(N);
IF T(N)>0 THEN PRINT FNTB$(17);FND$(T(N))
8920 IF i(1,N)>0
z$=" Weeks":IF i(1,n)=1 THEN z$=" Week"
LOCATE N+1,24
PRINT FND$(i(1,N));z$
END IF
8950 NEXT N
8990 GOSUB click:GOTO 5000
' ---------------------
CLEAR_RIGHT_WINDOW:
FOR NZ=1 TO 22
LOCATE NZ,13
PRINT SPACE$(20)
NEXT NZ
LOCATE 24,1:PRINT SPACE$(28)
LOCATE 25,1:PRINT SPACE$(28)
RETURN
' ---------------------
9090 Z$=INKEY$
IF Z$=" " THEN 9090
Z$=UCASE$(Z$)
RETURN
' ---------------------
9100 COLOR 2
IF q<>8 THEN LOCATE 24,1:PRINT SPACE$(28)
LOCATE 25,1:PRINT SPACE$(38)
IF Q=9
LOCATE 25,1
PRINT "REF TO CHANGE/U TO RETURN"
z$="":DO WHILE z$<CHR$(97) OR z$>CHR$(117)
z$=INKEY$
LOOP:IF z$="u" THEN z$="R"
IF Z$="R" THEN 9119
END IF
IF Q=8
LOCATE 25,1
PRINT "SELECT 1 TO 5"
z$="":DO WHILE z$<CHR$(49) OR z$>CHR$(53)
z$=INKEY$:
LOOP:z=VAL(z$):GOTO 9119
END IF
IF Q=7
LOCATE 25,1
PRINT "SELECT A TO T"
z$="":DO WHILE z$<CHR$(97) OR z$>CHR$(116)
z$=INKEY$
LOOP
END IF
IF Q=6
LOCATE 25,1
PRINT "SELECT A TO O"
z$="":DO WHILE z$<CHR$(97) OR z$>CHR$(111)
z$=INKEY$
LOOP
END IF
IF Q=5
LOCATE 25,1
PRINT "SELECT MINIMUM SKILL 1 TO 7"
z$="":DO WHILE z$<CHR$(49) OR z$>CHR$(55)
z$=INKEY$
LOOP:z=VAL(z$):GOTO 9119
END IF
9118 Z=ASC(z$)-64
9119 Q=0
RETURN
' ---------------------
9120 Z&=INT(A&(Z1,Z2))
Z3=INT(Z&/10000) : Z&=Z&-Z3*10000
Z4=INT(Z&/1000) : Z&=Z&-Z4*1000
Z5=INT(Z&/100) : Z&=Z&-Z5*100
Z6=Z&
RETURN
' ---------------------
9130 Z&=INT(C&(ZZ))
Z3=INT(Z&/1000) : Z&=Z&-Z3*1000
Z4=INT(Z&/100) : Z&=Z&-Z4*100
Z5=Z&
RETURN
' ---------------------
9140 Z&=INT(B&(ZZ))
Z3=INT(Z&/10000000) : Z&=Z&-Z3*10000000
Z4=INT(Z&/1000000) : Z&=Z&-Z4*1000000
Z5=INT(Z&/10000) : Z&=Z&-Z5*10000
Z6=INT(Z&/1000) : Z&=Z&-Z6*1000
RETURN
' ---------------------
9170 GOTO 9201
9172 JAY$ = INKEY$
JAY$ = UCASE$(JAY$)
IF JAY$ <> "R" THEN 9170
9174 RETURN
' ---------------------
9180 Z$=FND$(B&(X1))
X$=FND$(X3)
MID$(Z$,X2,1)=X$
B&(X1)=VAL (Z$)
RETURN
' ---------------------
9190 INPUT_SAVE
LINE INPUT " ENTER Y OR N ";Z$
Z$=UCASE$(Z$)
INPUT_RESTORE
IF Z$<>"Y" AND Z$<>"N" THEN 9190
9192 RETURN
' ---------------------
click:
9201 LOCATE 25,1:COLOR 2
PRINT " > PRESS SPACE BAR < "
xx$="v":DO WHILE xx$<>CHR$(32)
xx$=INKEY$
LOOP
9210 GOSUB 9300
RETURN
' ---------------------
9300 LOCATE 25,1
PRINT" "
RETURN
9350 T=INT(((Z3*150)+((5-LY)*150)+((DI-1)*100)))
IF LY<5 THEN T=INT(T+800)
9351 IF Z5<20 THEN T=INT(T*0.7)
9352 IF Z3>7 THEN T=INT(T+(2250*(Z3-7)))
9353 T=T+INT(ZM*((6-LY)*30))
9355 T=INT(T*10)
RETURN
WAIT_WHILE:
IF debugging
RETURN
END IF
FOR DELAY_TIMER = 0 TO 1750
DELAY_2 = DELAY_TIMER
DELAY_2 = DELAY_TIMER+0.8
DELAY_2 = DELAY_2*DELAY_2
NEXT
RETURN
' ---------------------
' Misc Subroutines
SUB INPUT_SAVE
LOCATE 25,1
CLEAR_INPUT_LINE
END SUB
SUB INPUT_RESTORE
LOCATE 25,1
CLEAR_INPUT_LINE
END SUB
SUB CLEAR_INPUT_LINE
'Clears the INPUT line of the display.
LOCATE 23,1
PRINT SPACE$(64);
LOCATE 23,1
END SUB
SUB PAUSE(PAUSE_DELAY)
SHARED BREAK_FLAG
IF PAUSE_DELAY=0
WHILE INKEY$="" : WEND
ELSE
ON TIMER ((PAUSE_DELAY/2)) GOSUB TIMEOUT
TIMER ON
BREAK_FLAG=0
WHILE BREAK_FLAG=0 AND INKEY$=""
WEND
TIMER OFF
END IF
END SUB
TIMEOUT:
BREAK_FLAG=-1
RETURN
SUB STRSET(P1$,P2$)
P1$=P2$+SPACE$(LEN(P1$)-LEN(P2$))
END SUB
delay:
x=speed*500
FOR rx=1 TO x
NEXT
RETURN
9500 COLOR 2
IF Q=9 THEN LOCATE 24,1:PRINT SPACE$(30)
LOCATE 25,1:PRINT SPACE$(38)
IF Q=9
LOCATE 25,1
PRINT "REF TO CHANGE/W TO RETURN"
z$="":DO WHILE z$<CHR$(97) OR z$>CHR$(119)
z$=INKEY$
LOOP:IF z$="w" THEN z$="R"
IF Z$="R" THEN 9519
END IF
IF Q=7
LOCATE 25,1
PRINT "SELECT A TO V";sub$
z$="":DO WHILE z$<CHR$(97) OR z$>CHR$(118)
z$=INKEY$
LOOP
END IF
9518 Z=ASC(z$)-64
9519 Q=0:RETURN